Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jul 2014 08:05:42 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r268383 - in head/sys: amd64/amd64 i386/i386
Message-ID:  <201407080805.s6885gXi015186@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407080805.s6885gXi015186>