From 147b1ec2b142df1648bc5d5ec6356b18efb46356 Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Tue, 3 Mar 2015 17:07:21 +0100 Subject: [PATCH] hw_x86_64: Adjust parameter type of Message_tpl::prepare_send Change the type of the local name parameter from unsigned to unsigned long. Otherwise only 4 bytes are copied on x86_64, leaving 4 bytes of garbage. --- repos/base-hw/include/base/native_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-hw/include/base/native_types.h b/repos/base-hw/include/base/native_types.h index 495d8c203..69902e332 100644 --- a/repos/base-hw/include/base/native_types.h +++ b/repos/base-hw/include/base/native_types.h @@ -197,7 +197,7 @@ class Genode::Message_tpl * \param name local name that shall be the first payload word */ void prepare_send(void * const data, size_t data_size, - unsigned const name) + unsigned long const name) { /* limit data size */ if (data_size > _max_data_size()) { @@ -205,7 +205,7 @@ class Genode::Message_tpl data_size = _max_data_size(); } /* copy data */ - *(unsigned *)_data = name; + *(unsigned long *)_data = name; void * const data_dst = (void *)((addr_t)_data + sizeof(name)); void * const data_src = (void *)((addr_t)data + sizeof(name)); memcpy(data_dst, data_src, data_size - sizeof(name));