summaryrefslogtreecommitdiffstats
path: root/sys/i386/svr4
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2000-11-30 05:23:49 +0000
committermarcel <marcel@FreeBSD.org>2000-11-30 05:23:49 +0000
commit75c76bdc6b73745ecfa9955e547ca6ba4fd7d328 (patch)
treec43af70e24691529e40621dabcaf4913d9d353f4 /sys/i386/svr4
parent673e30eadab9fe762d23631609edf13e018f59c1 (diff)
downloadFreeBSD-src-75c76bdc6b73745ecfa9955e547ca6ba4fd7d328.zip
FreeBSD-src-75c76bdc6b73745ecfa9955e547ca6ba4fd7d328.tar.gz
Don't use p->p_sigstk.ss_flags to keep state of whether the
process is on the alternate stack or not. For compatibility with sigstack(2) state is being updated if such is needed. We now determine whether the process is on the alternate stack by looking at its stack pointer. This allows a process to siglongjmp from a signal handler on the alternate stack to the place of the sigsetjmp on the normal stack. When maintaining state, this would have invalidated the state information and causing a subsequent signal to be delivered on the normal stack instead of the alternate stack. PR: 22286
Diffstat (limited to 'sys/i386/svr4')
-rw-r--r--sys/i386/svr4/svr4_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/svr4/svr4_machdep.c b/sys/i386/svr4/svr4_machdep.c
index 38c5cc8..018fb74 100644
--- a/sys/i386/svr4/svr4_machdep.c
+++ b/sys/i386/svr4/svr4_machdep.c
@@ -404,7 +404,7 @@ svr4_sendsig(catcher, sig, mask, code)
#endif
tf = p->p_md.md_regs;
- oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = sigonstack(tf->tf_esp);
/*
* Allocate space for the signal handler context.
OpenPOWER on IntegriCloud