Correct si_code for the SIGBUS signal generated by the alignment trap.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2014-07-08 08:05:42 +00:00
parent edcb40eb4e
commit a5244bac2e
2 changed files with 8 additions and 0 deletions

View file

@ -313,6 +313,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;

View file

@ -366,6 +366,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;