Commit 2c880bdf by Ed Falis Committed by Arnaud Charlet

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

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
parent d8221f45
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> 2009-04-10 Thomas Quinot <quinot@adacore.com>
* sem_ch6.ads (Check_Subtype_Conformant): Add ??? comment for * sem_ch6.ads (Check_Subtype_Conformant): Add ??? comment for
...@@ -1782,8 +1782,9 @@ getpid (void) ...@@ -1782,8 +1782,9 @@ getpid (void)
} }
#endif #endif
/* VxWorks expects the field excCnt to be zeroed when a signal is handled. /* VxWorks 653 vThreads expects the field excCnt to be zeroed when a signal is.
The VxWorks version of longjmp does this; GCC's builtin_longjmp doesn't. */ handled. The VxWorks version of longjmp does this; GCC's builtin_longjmp
doesn't. */
void void
__gnat_clear_exception_count (void) __gnat_clear_exception_count (void)
{ {
...@@ -1822,19 +1823,31 @@ __gnat_map_signal (int sig) ...@@ -1822,19 +1823,31 @@ __gnat_map_signal (int sig)
msg = "SIGBUS: possible stack overflow"; msg = "SIGBUS: possible stack overflow";
break; break;
#else #else
#ifdef __RTP__ #if (_WRS_VXWORKS_MAJOR = 6)
/* In RTP mode a SIGSEGV is most likely due to a stack overflow,
since stack checking uses the probing mechanism. */
case SIGILL: case SIGILL:
exception = &constraint_error; exception = &constraint_error;
msg = "SIGILL"; msg = "SIGILL";
break; 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: case SIGSEGV:
exception = &storage_error; exception = &storage_error;
msg = "SIGSEGV: possible stack overflow"; msg = "SIGSEGV: possible stack overflow";
break; break;
#else #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. */ since stack checking uses the stack limit mechanism. */
case SIGILL: case SIGILL:
exception = &storage_error; exception = &storage_error;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
-- S Y S T E M -- -- S Y S T E M --
-- -- -- --
-- S p e c -- -- S p e c --
-- (VxWorks Version PPC) -- -- (VxWorks 5 Version PPC) --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- -- -- --
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
-- S Y S T E M -- -- S Y S T E M --
-- -- -- --
-- S p e c -- -- S p e c --
-- (VxWorks Version x86) -- -- (VxWorks 5 Version x86) --
-- -- -- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- -- -- --
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment