host-darwin.c (segv_handler): Unblock SEGV so we don't go into an infinite loop.
authorGeoffrey Keating <geoffk@apple.com>
Mon, 5 Dec 2005 19:37:11 +0000 (19:37 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Mon, 5 Dec 2005 19:37:11 +0000 (19:37 +0000)
* config/rs6000/host-darwin.c (segv_handler): Unblock SEGV so
we don't go into an infinite loop.

From-SVN: r108070

gcc/ChangeLog
gcc/config/rs6000/host-darwin.c

index d443ba6a98948073fe054a85bc5eca420f613ace..57153ed8e4ba6ae29b5bf60a71310885d592bb0e 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-05  Geoffrey Keating  <geoffk@apple.com>
+
+       * config/rs6000/host-darwin.c (segv_handler): Unblock SEGV so
+       we don't go into an infinite loop.
+
 2005-12-05  Paolo Bonzini  <bonzini@gnu.org>
 
         * config/rs6000/predicates.md (logical_const_operand): Split
index 694d0a1dcd1008d7c946e095a5de7c47aba19a69..75c92a2a25bd4620125839f71edcc8f0861a6ca6 100644 (file)
@@ -58,11 +58,15 @@ segv_handler (int sig ATTRIBUTE_UNUSED,
              void *scp)
 {
   ucontext_t *uc = (ucontext_t *)scp;
+  sigset_t sigset;
   unsigned faulting_insn;
 
   /* The fault might have happened when trying to run some instruction, in
      which case the next line will segfault _again_.  Handle this case.  */
   signal (SIGSEGV, segv_crash_handler);
+  sigemptyset (&sigset);
+  sigaddset (&sigset, SIGSEGV);
+  sigprocmask (SIG_UNBLOCK, &sigset, NULL);
 
   faulting_insn = *(unsigned *)uc->uc_mcontext->ss.srr0;