From: Tom Hughes Date: Mon, 24 May 2010 13:40:10 +0000 (+0000) Subject: Fix amd64 and ppc64 to correctly mark mq_timedreceive as LINXY so that X-Git-Tag: svn/VALGRIND_3_6_0~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f26002da90e9468b7cbd55eb5126a7f714769955;p=thirdparty%2Fvalgrind.git Fix amd64 and ppc64 to correctly mark mq_timedreceive as LINXY so that the post handler is run to mark the retrieved message as correct. Also change the post handler to only mark the number of bytes actually returned as defined, rather than the whole buffer. Fixes #238679. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11133 --- diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index cf0170150b..466fe1fb5d 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -1343,7 +1343,7 @@ static SyscallTableEntry syscall_table[] = { LINXY(__NR_mq_open, sys_mq_open), // 240 LINX_(__NR_mq_unlink, sys_mq_unlink), // 241 LINX_(__NR_mq_timedsend, sys_mq_timedsend), // 242 - LINX_(__NR_mq_timedreceive, sys_mq_timedreceive),// 243 + LINXY(__NR_mq_timedreceive, sys_mq_timedreceive),// 243 LINX_(__NR_mq_notify, sys_mq_notify), // 244 LINXY(__NR_mq_getsetattr, sys_mq_getsetattr), // 245 diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index d2cfbbda70..b3b4ccf667 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -1726,7 +1726,7 @@ PRE(sys_mq_timedreceive) } POST(sys_mq_timedreceive) { - POST_MEM_WRITE( ARG2, ARG3 ); + POST_MEM_WRITE( ARG2, RES ); if (ARG4 != 0) POST_MEM_WRITE( ARG4, sizeof(unsigned int) ); } diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c index fa4b8637bd..4f1bf29b9e 100644 --- a/coregrind/m_syswrap/syswrap-ppc64-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c @@ -1479,7 +1479,7 @@ static SyscallTableEntry syscall_table[] = { LINX_(__NR_mq_unlink, sys_mq_unlink), // 263 LINX_(__NR_mq_timedsend, sys_mq_timedsend), // 264 - LINX_(__NR_mq_timedreceive, sys_mq_timedreceive), // 265 + LINXY(__NR_mq_timedreceive, sys_mq_timedreceive), // 265 LINX_(__NR_mq_notify, sys_mq_notify), // 266 LINXY(__NR_mq_getsetattr, sys_mq_getsetattr), // 267 // _____(__NR_kexec_load, sys_kexec_load), // 268