]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 359201 futex syscall skips argument 5 if op is FUTEX_WAIT_BITSET
authorMark Wielaard <mark@klomp.org>
Wed, 17 Feb 2016 20:53:34 +0000 (20:53 +0000)
committerMark Wielaard <mark@klomp.org>
Wed, 17 Feb 2016 20:53:34 +0000 (20:53 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15793

NEWS
coregrind/m_syswrap/syswrap-linux.c

diff --git a/NEWS b/NEWS
index 542d62466e45435fd04d9fcbe7f0faf82f7a14b3..ba4828f3ad7a1a091140fe5f648eb3debf949276 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -70,6 +70,7 @@ where XXXXXX is the bug number as listed below.
 357871  pthread_spin_destroy not properly wrapped
 357887  Fix a file handle leak. VG_(fclose) did not close the file
 358030  support direct socket calls on x86 32bit (new in linux 4.3)
+359201  futex syscall "skips" argument 5 if op is FUTEX_WAIT_BITSET
 359133  Assertion 'eltSzB <= ddpa->poolSzB' failed
 359289  s390x: popcnt (B9E1) not implemented
 
index f796969898ee092adfa544ea957dcefe3d247a31..b57436cdae34c0a8e50cbc98f5b7e2e61f3e5053 100644 (file)
@@ -1154,13 +1154,16 @@ PRE(sys_futex)
             return;
       }
       if (*(vki_u32 *)ARG1 != ARG3) {
-         PRE_REG_READ5(long, "futex",
+         PRE_REG_READ4(long, "futex",
                        vki_u32 *, futex, int, op, int, val,
-                       struct timespec *, utime, int, dummy);
+                       struct timespec *, utime);
       } else {
-         PRE_REG_READ6(long, "futex",
+        /* Note argument 5 is unused, but argument 6 is used.
+           So we cannot just PRE_REG_READ6. Read argument 6 separately.  */
+         PRE_REG_READ4(long, "futex",
                        vki_u32 *, futex, int, op, int, val,
-                       struct timespec *, utime, int, dummy, int, val3);
+                       struct timespec *, utime);
+         PRA6("futex",int,val3);
       }
       break;
    case VKI_FUTEX_WAKE_BITSET: