On ppc, Valgrind reports spurious errors in rt_sigaction. For example: $ valgrind /bin/ls ==12019== Memcheck, a memory error detector. ==12019== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. <snip> ==12019== Syscall param rt_sigaction(act) points to uninitialised byte(s) ==12019== at 0x11A87D7C: __libc_sigaction (in /lib/tls/libpthread.so.0) ==12019== by 0x11A7E940: __pthread_initialize_minimal (in /lib/tls/libpthread.so.0) ==12019== by 0x11A7E72C: (within /lib/tls/libpthread.so.0) ==12019== by 0x1187BEE4: call_init (in /lib/ld-2.3.3.so) ==12019== by 0x1187C018: _dl_init (in /lib/ld-2.3.3.so) ==12019== by 0x118804B4: _start (in /lib/ld-2.3.3.so) ==12019== Address 0x349FDD58 is on thread 1's stack <snip> The ppc implementation of sigaction doesn't ever read or write to the sa_restorer field, so Valgrind is flagging it as an error. See below for a patch adopted from Paul's 2.4 port.
Created attachment 11868 [details] sys_rt_sigaction patch (adopted from Paul's 2.4 ppc port) This patch makes the PRE & POST functions for sys_rt_sigaction platform specific, so they are removed from syswrap-generic.c and added to the amd64, ppc, and x86 version. The ppc version is modified so that bogus values in the sa_restorer fields in the parameters are not flagged as errors. The patch also adds PRE and POST functions for sys_sigaction on ppc, and avoids flagging bogus sa_restorer values there as well. Tested on ppc and x86.