diff options
| author | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2002-12-04 15:04:18 +0000 |
|---|---|---|
| committer | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2002-12-04 15:04:18 +0000 |
| commit | df44e708b1bc095a0364626fe568aa1c63977214 (patch) | |
| tree | 0a05e4f183aaba98173e8b6410407c74c726314b /sys/pc98 | |
| parent | 2517862ed9eb4924235eed2dff14fd338d0094d6 (diff) | |
Notes
Diffstat (limited to 'sys/pc98')
| -rw-r--r-- | sys/pc98/i386/machdep.c | 9 | ||||
| -rw-r--r-- | sys/pc98/pc98/machdep.c | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 57b21b634f34d..d02293d40354f 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -526,6 +526,7 @@ sendsig(catcher, sig, mask, code) struct proc *p; struct thread *td; struct sigacts *psp; + char *sp; struct trapframe *regs; int oonstack; @@ -564,13 +565,15 @@ sendsig(catcher, sig, mask, code) /* Allocate space for the signal handler context. */ if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct sigframe *)(p->p_sigstk.ss_sp + - p->p_sigstk.ss_size - sizeof(struct sigframe)); + sp = p->p_sigstk.ss_sp + + p->p_sigstk.ss_size - sizeof(struct sigframe); #if defined(COMPAT_43) || defined(COMPAT_SUNOS) p->p_sigstk.ss_flags |= SS_ONSTACK; #endif } else - sfp = (struct sigframe *)regs->tf_esp - 1; + sp = (char *)regs->tf_esp - sizeof(struct sigframe); + /* Align to 16 bytes. */ + sfp = (struct sigframe *)((unsigned int)sp & ~0xF); PROC_UNLOCK(p); /* Translate the signal if appropriate. */ diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 57b21b634f34d..d02293d40354f 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -526,6 +526,7 @@ sendsig(catcher, sig, mask, code) struct proc *p; struct thread *td; struct sigacts *psp; + char *sp; struct trapframe *regs; int oonstack; @@ -564,13 +565,15 @@ sendsig(catcher, sig, mask, code) /* Allocate space for the signal handler context. */ if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { - sfp = (struct sigframe *)(p->p_sigstk.ss_sp + - p->p_sigstk.ss_size - sizeof(struct sigframe)); + sp = p->p_sigstk.ss_sp + + p->p_sigstk.ss_size - sizeof(struct sigframe); #if defined(COMPAT_43) || defined(COMPAT_SUNOS) p->p_sigstk.ss_flags |= SS_ONSTACK; #endif } else - sfp = (struct sigframe *)regs->tf_esp - 1; + sp = (char *)regs->tf_esp - sizeof(struct sigframe); + /* Align to 16 bytes. */ + sfp = (struct sigframe *)((unsigned int)sp & ~0xF); PROC_UNLOCK(p); /* Translate the signal if appropriate. */ |
