diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-22 19:25:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-02-22 19:25:18 +0000 |
commit | 603c2c10ecda9c18a85f025e3ed39281af0d9327 (patch) | |
tree | d2f8cbefb6c2131bdde99188d00775b0fd8320e5 /sys/arch/sparc64 | |
parent | 8587f314348ce0067933e1207bbd0d1c15e33830 (diff) |
a few sigval_ptr cases were returning pc instead of fault address
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index dbe44cd5de9..5adfe3c23f2 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.15 2002/01/23 15:19:10 jason Exp $ */ +/* $OpenBSD: trap.c,v 1.16 2002/02/22 19:25:17 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -617,6 +617,7 @@ badtrap: ADVANCE; break; } + /* XXX sv.sival_ptr should be the fault address! */ trapsignal(p, SIGBUS, 0, BUS_ADRALN, sv); /* XXX code?? */ break; @@ -785,7 +786,7 @@ data_access_fault(tf, type, pc, addr, sfva, sfsr) u_quad_t sticks; union sigval sv; - sv.sival_ptr = (void *)pc; + sv.sival_ptr = (void *)addr; uvmexp.traps++; if ((p = curproc) == NULL) /* safety check */ @@ -1051,7 +1052,6 @@ text_access_fault(tf, type, pc, sfsr) panic("kernel fault"); /* NOTREACHED */ } - sv.sival_ptr = (void *)va; trapsignal(p, SIGSEGV, access_type, SEGV_MAPERR, sv); } if ((tstate & TSTATE_PRIV) == 0) { @@ -1161,7 +1161,6 @@ text_access_error(tf, type, pc, sfsr, afva, afsr) panic("kernel fault"); /* NOTREACHED */ } - sv.sival_ptr = (void *)va; trapsignal(p, SIGSEGV, access_type, SEGV_MAPERR, sv); } out: |