about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/i386/exc2signal.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2001-07-07 20:34:28 +0000
committerMark Kettenis <kettenis@gnu.org>2001-07-07 20:34:28 +0000
commit43c6b44414c908f19b56d3466a218e65640aac91 (patch)
treeb30217e9ea20ce990787c009947563138b499235 /sysdeps/mach/hurd/i386/exc2signal.c
parent22af13de454d18449856c2334f77e5e6b4818fa7 (diff)
downloadglibc-43c6b44414c908f19b56d3466a218e65640aac91.tar.gz
glibc-43c6b44414c908f19b56d3466a218e65640aac91.tar.xz
glibc-43c6b44414c908f19b56d3466a218e65640aac91.zip
* sysdeps/mach/hurd/i386/exc2signal.c (_hurd_exception2signal): Generate SIGSEGV instead of SIGBUS for KERN_INVALID_ADDRESS and KERN_WRITE_PROTECTION_FAILURE.
2001-07-07  Mark Kettenis  <kettenis@gnu.org>

	* sysdeps/mach/hurd/i386/exc2signal.c (_hurd_exception2signal):
	Generate SIGSEGV instead of SIGBUS for KERN_INVALID_ADDRESS and
	KERN_WRITE_PROTECTION_FAILURE.
Diffstat (limited to 'sysdeps/mach/hurd/i386/exc2signal.c')
-rw-r--r--sysdeps/mach/hurd/i386/exc2signal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/i386/exc2signal.c b/sysdeps/mach/hurd/i386/exc2signal.c
index f1c5682ea1..a6bf750d78 100644
--- a/sysdeps/mach/hurd/i386/exc2signal.c
+++ b/sysdeps/mach/hurd/i386/exc2signal.c
@@ -1,5 +1,5 @@
 /* Translate Mach exception codes into signal numbers.  i386 version.
-   Copyright (C) 1991, 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1991,1992,1994,1996,1997,2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,9 @@ _hurd_exception2signal (struct hurd_signal_detail *detail, int *signo)
       break;
 
     case EXC_BAD_ACCESS:
-      if (detail->exc_code == KERN_PROTECTION_FAILURE)
+      if (detail->exc_code == KERN_INVALID_ADDRESS
+	  || detail->exc_code == KERN_PROTECTION_FAILURE
+	  || detail->exc_code == KERN_WRITE_PROTECTION_FAILURE)
 	*signo = SIGSEGV;
       else
 	*signo = SIGBUS;