Created attachment 62839 [details] source of test program showing fault Version: unspecified OS: Linux source code v3.6.1 from Valgrind site. program fails with gpf under valgrind - in signal handler. failing instruction is moveaps which requires 16 byte alignment - stack in signal handler is 8 byte aligned. run without valgrind , stack is 16 byte aligned and program runs o.k. Reproducible: Always Steps to Reproduce: g++ -m64 -lrt -ggdb <source> run - no arguments Actual Results: gpf Expected Results: program runs - no output. problem is fixed by the following change : diff valgrind/valgrind-3.6.1/coregrind/m_sigframe/sigframe-amd64-linux.c valgrind/valgrind-3.6.1/coregrind/m_sigframe/sigframe-amd64-linux.c.orig 454c454 < rsp = VG_ROUNDDN(rsp, 16) - 8; --- > rsp = VG_ROUNDDN(rsp, 16);
Created attachment 75852 [details] Considerably simpler testcase.
This bug is still current as of r13180 and I can confirm that the OP's patch fixes it. Given the requirement that (%RSP - 8) needs to be aligned to 16 bytes (System V Application Binary Interface - AMD64 Architecture Processor Supplement, 3.2.2) it seems to be the obvious fix. Took a whole afternoon to track down (thanks to Tom Hughes on IRC), just to find its already been reported & fixed but just not yet applied...
Fix committed as r13182.