--- valgrind-3.2.3/include/vki-linux.h (revision 6760) +++ valgrind-3.2.3/include/vki-linux.h (working copy) @@ -1151,6 +1151,7 @@ #define VKI_FUTEX_FD (2) #define VKI_FUTEX_REQUEUE (3) #define VKI_FUTEX_CMP_REQUEUE (4) +#define VKI_FUTEX_PRIVATE_FLAG (128) struct vki_robust_list { struct vki_robust_list __user *next; --- valgrind-3.2.3/coregrind/m_syswrap/syswrap-linux.c (revision 6760) +++ valgrind-3.2.3/coregrind/m_syswrap/syswrap-linux.c (working copy) @@ -843,21 +843,25 @@ PRINT("sys_futex ( %p, %d, %d, %p, %p )", ARG1,ARG2,ARG3,ARG4,ARG5); switch(ARG2) { case VKI_FUTEX_CMP_REQUEUE: + case VKI_FUTEX_CMP_REQUEUE | VKI_FUTEX_PRIVATE_FLAG: PRE_REG_READ6(long, "futex", vki_u32 *, futex, int, op, int, val, struct timespec *, utime, vki_u32 *, uaddr2, int, val3); break; case VKI_FUTEX_REQUEUE: + case VKI_FUTEX_REQUEUE | VKI_FUTEX_PRIVATE_FLAG: PRE_REG_READ5(long, "futex", vki_u32 *, futex, int, op, int, val, struct timespec *, utime, vki_u32 *, uaddr2); break; case VKI_FUTEX_WAIT: + case VKI_FUTEX_WAIT | VKI_FUTEX_PRIVATE_FLAG: PRE_REG_READ4(long, "futex", vki_u32 *, futex, int, op, int, val, struct timespec *, utime); break; case VKI_FUTEX_WAKE: + case VKI_FUTEX_WAKE | VKI_FUTEX_PRIVATE_FLAG: case VKI_FUTEX_FD: PRE_REG_READ3(long, "futex", vki_u32 *, futex, int, op, int, val); @@ -873,16 +877,20 @@ switch(ARG2) { case VKI_FUTEX_WAIT: + case VKI_FUTEX_WAIT | VKI_FUTEX_PRIVATE_FLAG: if (ARG4 != 0) PRE_MEM_READ( "futex(timeout)", ARG4, sizeof(struct vki_timespec) ); break; case VKI_FUTEX_REQUEUE: + case VKI_FUTEX_REQUEUE | VKI_FUTEX_PRIVATE_FLAG: case VKI_FUTEX_CMP_REQUEUE: + case VKI_FUTEX_CMP_REQUEUE | VKI_FUTEX_PRIVATE_FLAG: PRE_MEM_READ( "futex(futex2)", ARG5, sizeof(Int) ); break; case VKI_FUTEX_WAKE: + case VKI_FUTEX_WAKE | VKI_FUTEX_PRIVATE_FLAG: case VKI_FUTEX_FD: /* no additional pointers */ break;