From c2d1e1826f9feaeba0f558a9d1c318886772547a Mon Sep 17 00:00:00 2001 From: kib Date: Tue, 15 Jul 2014 10:01:33 +0000 Subject: [PATCH] MFC r268383: Correct si_code for the SIGBUS signal generated by the alignment trap. --- sys/amd64/amd64/trap.c | 4 ++++ sys/i386/i386/trap.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 91fc879c38d3..1fdc5d9426ec 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -345,6 +345,10 @@ trap(struct trapframe *frame) i = SIGBUS; ucode = BUS_OBJERR; break; + case T_ALIGNFLT: + i = SIGBUS; + ucode = BUS_ADRALN; + break; case T_DOUBLEFLT: /* double fault */ default: i = SIGBUS; diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index f9a5bff53bc0..48064343b306 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -398,6 +398,10 @@ trap(struct trapframe *frame) i = SIGBUS; ucode = BUS_OBJERR; break; + case T_ALIGNFLT: + i = SIGBUS; + ucode = BUS_ADRALN; + break; case T_DOUBLEFLT: /* double fault */ default: i = SIGBUS;