diff options
author | Geoffrey Keating <geoffk@apple.com> | 2005-12-05 19:37:11 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2005-12-05 19:37:11 +0000 |
commit | 68e58c33468f3523c1eb6232d0a4d1e949db3011 (patch) | |
tree | e450f27873614a518a1821132358d8caac91e0b3 /gcc | |
parent | c44ca1626c8e2b6519a6ae58780a55a741fd42e2 (diff) | |
download | gcc-68e58c33468f3523c1eb6232d0a4d1e949db3011.zip gcc-68e58c33468f3523c1eb6232d0a4d1e949db3011.tar.gz gcc-68e58c33468f3523c1eb6232d0a4d1e949db3011.tar.bz2 |
host-darwin.c (segv_handler): Unblock SEGV so we don't go into an infinite loop.
* config/rs6000/host-darwin.c (segv_handler): Unblock SEGV so
we don't go into an infinite loop.
From-SVN: r108070
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/host-darwin.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d443ba6..57153ed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/rs6000/host-darwin.c b/gcc/config/rs6000/host-darwin.c index 694d0a1..75c92a2 100644 --- a/gcc/config/rs6000/host-darwin.c +++ b/gcc/config/rs6000/host-darwin.c @@ -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; |