From: Rich Felker Date: Sat, 2 May 2015 15:57:20 +0000 (-0400) Subject: fix crash in x32 sigsetjmp X-Git-Tag: v1.1.9~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=551c1d7a5718667da2ee56434c18f0a9b9612ed2;p=oweals%2Fmusl.git fix crash in x32 sigsetjmp the 64-bit push reads not only the 32-bit return address but also the first 32 signal mask bits. if any were nonzero, the return address obtained will be invalid. at some point storage of the return address should probably be moved to follow the saved mask so that there's plenty room and the same code can be used on x32 and regular x86_64, but for now I want a fix that does not risk breaking x86_64, and this simple re-zeroing works. --- diff --git a/src/signal/x32/sigsetjmp.s b/src/signal/x32/sigsetjmp.s index 9a7695f9..1f02b0e5 100644 --- a/src/signal/x32/sigsetjmp.s +++ b/src/signal/x32/sigsetjmp.s @@ -14,6 +14,7 @@ __sigsetjmp: call setjmp@PLT pushq 64(%rbx) + movl $0, 4(%rsp) mov %rbx,%rdi mov %eax,%esi mov 72+8(%rbx),%rbx