Author: kib
Date: Tue Jul  8 08:05:42 2014
New Revision: 268383
URL: http://svnweb.freebsd.org/changeset/base/268383

Log:
  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

Modified:
  head/sys/amd64/amd64/trap.c
  head/sys/i386/i386/trap.c

Modified: head/sys/amd64/amd64/trap.c
==============================================================================
--- head/sys/amd64/amd64/trap.c Tue Jul  8 04:51:42 2014        (r268382)
+++ head/sys/amd64/amd64/trap.c Tue Jul  8 08:05:42 2014        (r268383)
@@ -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;

Modified: head/sys/i386/i386/trap.c
==============================================================================
--- head/sys/i386/i386/trap.c   Tue Jul  8 04:51:42 2014        (r268382)
+++ head/sys/i386/i386/trap.c   Tue Jul  8 08:05:42 2014        (r268383)
@@ -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;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to