This is a regression caused by valgrind svn r15823 which fixed Bug 359871 "sanitize signal mask in ppoll and pselect syscalls". The issue is caused by this C library/kernel ABI differences according to http://man7.org/linux/man-pages/man2/pselect6.2.html The Linux pselect6() system call modifies its timeout argument. However, the glibc wrapper function hides this behavior by using a local variable for the timeout argument that is passed to the system call. Thus, the glibc pselect() function does not modify its timeout argument; this is the behavior required by POSIX.1-2001. The final argument of the pselect6() system call is not a sigset_t * pointer, but is instead a structure of the form: struct { const sigset_t *ss; /* Pointer to signal set */ size_t ss_len; /* Size (in bytes) of object pointed to by 'ss' */ }; This allows the system call to obtain both a pointer to the signal set and its size, while allowing for the fact that most architectures support a maximum of 6 arguments to a system call. What we are seeing is glibc modifying the timeout argument (NULL) and passing it as a struct { NULL, 8 } (where 8 is the correct ss_len if ss wouldn't be NULL). valgrind doesn't check whether ss is NULL before calling PRE_MEM_READ on it and so generates a bogus warning. Reproducible: Always
Created attachment 99546 [details] Proposed testcase and fix When the last argument ss == NULL don't check whether it is valid and don't try to copy the sigmask (which would crash because it is NULL), just pass through the NULL sigmask to the kernel. Testcase provided by Paul Eggert in the original bug report https://bugzilla.redhat.com/show_bug.cgi?id=1344082
valgrind svn 15893
I made a typo which caused: ...checking makefile consistency none/tests/Makefile.am:1: error: pselect_sigmask_null.vgtest is missing in EXTRA_DIST none/tests/Makefile.am:1: error: pselect_signask_null.vgtest is in EXTRA_DIST but doesn't exist Fixed with valgrind svn r15894 Bug 364413 followup - fix signask -> sigmask typo in EXTRA_DIST
Test executable ignored in SVN r15904.