]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
init.c: Change VxWorks 6 stack overflow checking for kernel apps.
authorEd Falis <falis@adacore.com>
Fri, 10 Apr 2009 15:18:04 +0000 (15:18 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 10 Apr 2009 15:18:04 +0000 (17:18 +0200)
2009-04-10  Ed Falis  <falis@adacore.com>

* init.c: Change VxWorks 6 stack overflow checking for kernel apps.

* system-vxworks-ppc.ads, system-vxworks-x86.ads: Update header.

From-SVN: r145920

gcc/ada/ChangeLog
gcc/ada/init.c
gcc/ada/system-vxworks-ppc.ads
gcc/ada/system-vxworks-x86.ads

index 395cf6331f7d6fafe2049bd2dd79ac8f56c28164..05f268a3515974c8945f304d616596aa90baba1c 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-10  Ed Falis  <falis@adacore.com>
+
+       * init.c: Change VxWorks 6 stack overflow checking for kernel apps.
+
+       * system-vxworks-ppc.ads, system-vxworks-x86.ads: Update header.
+
 2009-04-10  Thomas Quinot  <quinot@adacore.com>
 
        * sem_ch6.ads (Check_Subtype_Conformant): Add ??? comment for
index a1f46ed9fcb8f8097c0e8e09c9348c22f3cb5bb4..78c55b83572c5e1838b0465f231a37e9df6b3755 100644 (file)
@@ -1782,8 +1782,9 @@ getpid (void)
 }
 #endif
 
-/* VxWorks expects the field excCnt to be zeroed when a signal is handled.
-   The VxWorks version of longjmp does this; GCC's builtin_longjmp doesn't.  */
+/* VxWorks 653 vThreads expects the field excCnt to be zeroed when a signal is.
+   handled. The VxWorks version of longjmp does this; GCC's builtin_longjmp
+   doesn't.  */
 void
 __gnat_clear_exception_count (void)
 {
@@ -1822,19 +1823,31 @@ __gnat_map_signal (int sig)
       msg = "SIGBUS: possible stack overflow";
       break;
 #else
-#ifdef __RTP__
-    /* In RTP mode a SIGSEGV is most likely due to a stack overflow,
-       since stack checking uses the probing mechanism.  */
+#if (_WRS_VXWORKS_MAJOR = 6)
     case SIGILL:
       exception = &constraint_error;
       msg = "SIGILL";
       break;
+#ifdef __RTP__
+    /* In RTP mode a SIGSEGV is most likely due to a stack overflow,
+       since stack checking uses the probing mechanism.  */
     case SIGSEGV:
       exception = &storage_error;
       msg = "SIGSEGV: possible stack overflow";
       break;
 #else
-    /* In kernel mode a SIGILL is most likely due to a stack overflow,
+      /* VxWorks 6 kernel mode with probing. SIGBUS for guard page hit */
+    case SIGSEGV:
+      exception = &program_error;
+      msg = "SIGSEGV";
+      break;
+    case SIGBUS:
+      exception = &storage_error;
+      msg = "SIGBUS: possible stack overflow";
+      break;
+#endif
+#else
+    /* VxWorks 5: a SIGILL is most likely due to a stack overflow,
        since stack checking uses the stack limit mechanism.  */
     case SIGILL:
       exception = &storage_error;
index be2ca3c92cc40e37153cd6ed452efea896dfefa3..8681e28b44dd345da2ea81b0f8e7d0ca3b906507 100644 (file)
@@ -5,7 +5,7 @@
 --                               S Y S T E M                                --
 --                                                                          --
 --                                 S p e c                                  --
---                          (VxWorks Version PPC)                           --
+--                         (VxWorks 5 Version PPC)                          --
 --                                                                          --
 --          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --
index 6ee9d45181a9a8ff4e7612da8e3e643cee5af9f1..a16fde29fee4d88d49d5e793d0b665bd916a9b87 100644 (file)
@@ -5,7 +5,7 @@
 --                               S Y S T E M                                --
 --                                                                          --
 --                                 S p e c                                  --
---                         (VxWorks Version x86)                            --
+--                         (VxWorks 5 Version x86)                          --
 --                                                                          --
 --          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --