From bcf55ab2b8330859798393d6d66802ad0661dafd Mon Sep 17 00:00:00 2001 From: marcel Date: Sun, 10 Oct 1999 08:38:33 +0000 Subject: \begin{quote} setjmp() gets the jmp_buf pointer from the wrong place (the place where the return address is) in the shlib case, and uses it (only) to fetch the current signal mask to address (return_address + 28). This address is normally read-only (I hope), so the sigprocmask() call has no effect except to return an error code. \end{quote} Submitted by: bde --- lib/libc/amd64/gen/setjmp.S | 2 +- lib/libc/i386/gen/setjmp.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S index e70879a..4a85658 100644 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -55,8 +55,8 @@ #include "SYS.h" ENTRY(setjmp) - PIC_PROLOGUE movl 4(%esp),%ecx + PIC_PROLOGUE leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ diff --git a/lib/libc/i386/gen/setjmp.S b/lib/libc/i386/gen/setjmp.S index e70879a..4a85658 100644 --- a/lib/libc/i386/gen/setjmp.S +++ b/lib/libc/i386/gen/setjmp.S @@ -55,8 +55,8 @@ #include "SYS.h" ENTRY(setjmp) - PIC_PROLOGUE movl 4(%esp),%ecx + PIC_PROLOGUE leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ -- cgit v1.1