summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-10-27 20:20:39 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-10-27 20:20:39 +0000
commit14a87c68bdff6d621d82e2f194661eae5a90ca0b (patch)
tree0e1c1884a690d89a9c343bfd2a8874b7dca2d065
parent26a30f1304610d3b18741612f3030a16828bf874 (diff)
Report proper pc address in siginfo; found the hard way by naddy@ and gcc 4.
ok deraadt@
-rw-r--r--sys/arch/alpha/alpha/trap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c
index ff004f17d12..52a6e93dfeb 100644
--- a/sys/arch/alpha/alpha/trap.c
+++ b/sys/arch/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.56 2010/06/30 20:38:49 tedu Exp $ */
+/* $OpenBSD: trap.c,v 1.57 2010/10/27 20:20:38 miod Exp $ */
/* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */
/*-
@@ -268,6 +268,7 @@ trap(a0, a1, a2, entry, framep)
uvmexp.traps++;
p = curproc;
ucode = 0;
+ v = 0;
user = (framep->tf_regs[FRAME_PS] & ALPHA_PSL_USERMODE) != 0;
if (user) {
p->p_md.md_tf = framep;
@@ -294,7 +295,8 @@ trap(a0, a1, a2, entry, framep)
goto out;
#endif
- ucode = a0; /* VA */
+ ucode = ILL_ILLADR;
+ v = (caddr_t)a0;
break;
}
@@ -323,8 +325,9 @@ trap(a0, a1, a2, entry, framep)
goto out;
#else
i = SIGFPE;
- ucode = a0;
+ ucode = FPE_FLTINV;
#endif
+ v = (caddr_t)framep->tf_regs[FRAME_PC];
break;
}
@@ -388,6 +391,7 @@ trap(a0, a1, a2, entry, framep)
printf("trap: unknown IF type 0x%lx\n", a0);
goto dopanic;
}
+ v = (caddr_t)framep->tf_regs[FRAME_PC];
break;
case ALPHA_KENTRY_MM: