diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-08-30 20:06:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-08-30 20:06:08 +0000 |
commit | eb02edbdd623fd23fd2d35a6d342ee107a2b0e81 (patch) | |
tree | 74367921c2870947937008a0a3527be282d7e87a /sys/arch | |
parent | ba980e0b18d0b7088e14b7b070d2d3f06b3592be (diff) |
properly handle onstack situation
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 1b2faace659..c8b90e8ec70 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.13 2001/08/30 17:58:27 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.14 2001/08/30 20:06:07 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -587,7 +587,7 @@ sendsig(catcher, sig, mask, code, type, val) struct rwindow tmpwin; #endif struct sigframe sf; - int onstack, oonstack; + int oonstack; extern char sigcode[], esigcode[]; #define szsigcode (esigcode - sigcode) @@ -600,7 +600,8 @@ sendsig(catcher, sig, mask, code, type, val) */ oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK; - if (onstack) { + if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack && + (psp->ps_sigonstack & sigmask(sig))) { fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp + psp->ps_sigstk.ss_size); psp->ps_sigstk.ss_flags = SS_ONSTACK; |