OSDN Git Service

* exceptions.cc (handle_exceptions): Translate a guard page exception to a
authorcgf <cgf>
Thu, 1 Dec 2005 20:52:00 +0000 (20:52 +0000)
committercgf <cgf>
Thu, 1 Dec 2005 20:52:00 +0000 (20:52 +0000)
"SIGBUS".

winsup/cygwin/ChangeLog
winsup/cygwin/exceptions.cc

index 8f92245..0594a4e 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-01  Christopher Faylor  <cgf@timesys.com>
+
+       * exceptions.cc (handle_exceptions): Translate a guard page exception
+       to a "SIGBUS".
+
 2005-12-01  Corinna Vinschen  <corinna@vinschen.de>
 
        * mmap.cc: Make debug output more consistently.  Fix some comments.
index 0988851..bc0ea73 100644 (file)
@@ -479,10 +479,14 @@ handle_exceptions (EXCEPTION_RECORD *e0, void *frame, CONTEXT *in0, void *)
       si.si_signo = SIGALRM;
       break;
 
+    case STATUS_GUARD_PAGE_VIOLATION:
+      si.si_signo = SIGBUS;
+      si.si_code = BUS_OBJERR;
+      break;
+
     case STATUS_ACCESS_VIOLATION:
     case STATUS_DATATYPE_MISALIGNMENT:
     case STATUS_ARRAY_BOUNDS_EXCEEDED:
-    case STATUS_GUARD_PAGE_VIOLATION:
     case STATUS_IN_PAGE_ERROR:
     case STATUS_NO_MEMORY:
     case STATUS_INVALID_DISPOSITION: