aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/init.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2009-04-16 12:41:38 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2009-04-16 14:41:38 +0200
commite8e028cb1f56f5f7068b78ef8cab6e7ae8f211d7 (patch)
tree630f3b21d444eb12ee9417639d119ed8165a6852 /gcc/ada/init.c
parent5dd11e511bf310aeacb6172dc766d1cb57043917 (diff)
downloadgcc-e8e028cb1f56f5f7068b78ef8cab6e7ae8f211d7.zip
gcc-e8e028cb1f56f5f7068b78ef8cab6e7ae8f211d7.tar.gz
gcc-e8e028cb1f56f5f7068b78ef8cab6e7ae8f211d7.tar.bz2
s-intman-susv3.adb: New file.
2009-04-16 Tristan Gingold <gingold@adacore.com> * s-intman-susv3.adb: New file. * init.c, s-osinte-darwin.ads: Fix stack checking in tasking mode From-SVN: r146179
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r--gcc/ada/init.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index af9ae61..e86a975 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -2117,6 +2117,7 @@ __gnat_error_handler (int sig, siginfo_t * si, void * uc)
switch (sig)
{
case SIGSEGV:
+ case SIGBUS:
/* FIXME: we need to detect the case of a *real* SIGSEGV. */
exception = &storage_error;
msg = "stack overflow or erroneous memory access";
@@ -2125,11 +2126,6 @@ __gnat_error_handler (int sig, siginfo_t * si, void * uc)
sigreturn (NULL, UC_RESET_ALT_STACK);
break;
- case SIGBUS:
- exception = &constraint_error;
- msg = "SIGBUS";
- break;
-
case SIGFPE:
exception = &constraint_error;
msg = "SIGFPE";
@@ -2172,12 +2168,12 @@ __gnat_install_handler (void)
sigaction (SIGFPE, &act, NULL);
if (__gnat_get_interrupt_state (SIGILL) != 's')
sigaction (SIGILL, &act, NULL);
- if (__gnat_get_interrupt_state (SIGBUS) != 's')
- sigaction (SIGBUS, &act, NULL);
act.sa_flags |= SA_ONSTACK;
if (__gnat_get_interrupt_state (SIGSEGV) != 's')
sigaction (SIGSEGV, &act, NULL);
+ if (__gnat_get_interrupt_state (SIGBUS) != 's')
+ sigaction (SIGBUS, &act, NULL);
__gnat_handler_installed = 1;
}