|
From: Matthias S. <zz...@ge...> - 2013-09-11 04:52:08
|
Hi there! My application crashes under helgrind executing movdqa. This is because the movdqa operand must be 16 bytes aligned, but in this case the operand is on the stack, and the stack is aligned wrong. Checking in gdb shows that mythread_wrapper from hg_intercepts.c is not keeping the stack aligned. This is because valgrind is compiled with "-mpreferred-stack-boundary=2". Some searching shows that you cannot call code with a lower value for preferred-stack-boundary. valgrind itself is not affected, as I think it does not call into libc and the kernel ABI is called correctly. But all parts that are executed on the virtual cpu and then calling other parts of the client application must have the correct stack-boundary value. The crash does not occur when changing "-mpreferred-stack-boundary=2" to "-mpreferred-stack-boundary=4" in configure.ac, or removing it. If valgrind is compiled with a lower value for space savings, at least the interceptions need to be compiled without it. See https://bugs.kde.org/show_bug.cgi?id=324050 There is also a modified testcase. Regards Matthias |