summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-10-10 08:38:33 +0000
committermarcel <marcel@FreeBSD.org>1999-10-10 08:38:33 +0000
commitbcf55ab2b8330859798393d6d66802ad0661dafd (patch)
tree2e3131f1b83ebe1e10193c79df9e027d798fdbc3 /lib
parent6f0c55764d0522b22e2aef4725b710af937ea577 (diff)
downloadFreeBSD-src-bcf55ab2b8330859798393d6d66802ad0661dafd.zip
FreeBSD-src-bcf55ab2b8330859798393d6d66802ad0661dafd.tar.gz
\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
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/amd64/gen/setjmp.S2
-rw-r--r--lib/libc/i386/gen/setjmp.S2
2 files changed, 2 insertions, 2 deletions
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 */
OpenPOWER on IntegriCloud