https://bugs.kde.org/show_bug.cgi?id=364413
Bug ID: 364413 Summary: pselect sycallwrapper mishandles NULL sigmask Product: valgrind Version: 3.11 SVN Platform: Other URL: https://bugzilla.redhat.com/show_bug.cgi?id=1344082 OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: m...@redhat.com 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 -- You are receiving this mail because: You are watching all bug changes.