]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix amd64 and ppc64 to correctly mark mq_timedreceive as LINXY so that
authorTom Hughes <tom@compton.nu>
Mon, 24 May 2010 13:40:10 +0000 (13:40 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 24 May 2010 13:40:10 +0000 (13:40 +0000)
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

coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/m_syswrap/syswrap-ppc64-linux.c

index cf0170150b940f6532f7b5a5c830761bd74696c1..466fe1fb5d8e85ac3a6756d64563b02ea7e477a0 100644 (file)
@@ -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 
index d2cfbbda70cb4c80c45dc465f6b258be781f8072..b3b4ccf66753f320ea6fc023a42b07c9709f38db 100644 (file)
@@ -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) );
 }
index fa4b8637bd374b55e38899cc19ea480666b02bcd..4f1bf29b9e148e10e6f75e9ac1d5fb49ed80eb71 100644 (file)
@@ -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