[Mono-bugs] [Bug 47689][Wis] Changed - The runtime should detect stack overflow
Tue, 10 Feb 2004 08:41:32 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by firstname.lastname@example.org.
--- shadow/47689 2004-01-19 07:13:54.000000000 -0500
+++ shadow/47689.tmp.9744 2004-02-10 08:41:32.000000000 -0500
@@ -77,6 +77,31 @@
------- Additional Comments From email@example.com 2004-01-07 08:40 -------
*** Bug 52654 has been marked as a duplicate of this bug. ***
------- Additional Comments From firstname.lastname@example.org 2004-01-19 07:13 -------
*** Bug 53048 has been marked as a duplicate of this bug. ***
+------- Additional Comments From email@example.com 2004-02-10 08:41 -------
+The following issues should be dealt with when implementing
+stack overflow handling:
+- The process is notified of stack overflow by receiving a SIGSEGV
+ signal. Since the signal handler also uses the stack, it will
+ cause another SIGSEGV. The solution is to use the sigaltstack function
+ to setup an alternate signal stack. Unfortunately, there are some
+ issues with sigaltstack and pthreads:
+- The signal handler needs to determine whenever the SIGSEGV is caused
+ by a stack overflow. This can be done by comparing the fault
+ address with the boundaries of the current threads stack.
+ The fault address can be obtained from the arguments passed to the
+ signal handler, but this is OS dependent.
+GNU smalltalk contains a library called 'sigsegv' which contains
+portable support for SIGSEGV handling for a lot of systems, but it is
+GPL, while the mono runtime is LGPL.