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:
kib 2014-07-08 08:05:42 +00:00
parent 13cd8ccc41
commit ae88c29379
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;