|
From: Craig C. <cc...@us...> - 2005-06-08 15:36:41
|
Hi, This patch applies to Paul Mackerras' latest Valgrind PPC port (http://valgrind.org/downloads/pmk/valgrind-2.4.0-ppc.tar.bz2). In the sigprocmask system call, we insert the sigNo into gpr3 so that it can be the first argument for the signal handler. However, before the signal handler gets called, we write the syscall return value into gpr 3, overwriting sigNo and causing the sigNo argument to be incorrect (typically 0) in the signal handler. The attached patch hacks around this by saving the sigNo in the ppc version of the arch_thread structure. It then swaps it into gpr3 before the signal handler is called, and swaps the syscall return value back into gpr3 afterwards. Unrelated note: Defect 106293 (http://bugs.kde.org/show_bug.cgi?id=106293) is also of interest to Valgrind PPC users. Although this bug seems to exist on Valgrind 2.4 and 3.0 for all platforms, the symptoms are much more prevelant on PPC. If you are seeing unexpected leaks reported when using VALGRIND_DO_LEAK_CHECK, try applying the patch attached to that bug. Thanks, Craig -- Craig Chaney cc...@us... |