Hide Forgot
Description of problem: I'd like to lobby for valgrind upstream's revision 13182 to be included into RHEL6. It looks like this: $ svn diff -c 13182 Index: coregrind/m_sigframe/sigframe-amd64-linux.c =================================================================== --- coregrind/m_sigframe/sigframe-amd64-linux.c (revision 13181) +++ coregrind/m_sigframe/sigframe-amd64-linux.c (revision 13182) @@ -452,7 +452,7 @@ UWord err; rsp -= sizeof(*frame); - rsp = VG_ROUNDDN(rsp, 16); + rsp = VG_ROUNDDN(rsp, 16) - 8; frame = (struct rt_sigframe *)rsp; if (!extend(tst, rsp, sizeof(*frame))) Without this, signal handlers are executed on a misaligned stack, and so instructions that require correct 16-byte alignment dump core. I see that this behavior was previously reported as rhbz #950585, which was closed WONTFIX apparently because it was thought to be a Postgres-specific problem. It isn't, though I'll admit that I'm griping mainly because this is preventing me from using valgrind on Postgres. Version-Release number of selected component (if applicable): valgrind-3.8.1-3.2.el6.x86_64 How reproducible: 100% Steps to Reproduce: There's a reproducer included in https://bugs.kde.org/show_bug.cgi?id=280114 where the issue was first diagnosed.
Full upstream commit log describes this as: Make sure the stack pointer is properly aligned when invoking a signal on amd64-linux systems. The amd64 ABI describes the required alignment on function entry as follows: "In other words, the value (%rsp − 8) is always a multiple of 16 when control is transferred to the function entry point. So we need to 16 byte align and then subtract an extra 8 bytes to achieve the correct alignment. Patch from fjgmacc to fix BZ#280114. The upstream bug report has a very small SIGALRM based testcase for this.
Verified for build valgrind-3.8.1-3.5.el6.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1464.html