[Mono-bugs] [Bug 81685][Wis] Changed - Stack Overflow detection

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jul 31 12:20:30 EDT 2007


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 lupus at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=81685

--- shadow/81685	2007-07-30 12:36:35.000000000 -0400
+++ shadow/81685.tmp.29588	2007-07-31 12:20:30.000000000 -0400
@@ -220,6 +220,27 @@
 uninformative short sigsegv message).
 
 Additional work needed:
 *) port more architectures to the new code
 *) setup the additional protected pages on the stacks so we can make
 stack overflows catchable, at least in some cases
+
+------- Additional Comments From lupus at ximian.com  2007-07-31 12:20 -------
+svn has a few improvements: we are able to catch stack overflows that
+happen in managed code in most cases. The missing cases are basically two:
+1) an additional stack overflow that happens in a finally/fault/filter
+clause while already handling a stack overflow (ie robert's sample
+above works, but it would fail if the first fault is caused by a stack
+overflow itself)
+2) a managed stack overflow that happens after a soft unmanaged stack
+overflow (where we unprotect the soft guard pages and let execution
+continue, at least until the thread recovers or does a hard stack
+overflow)
+In both cases we print useful error messages so the user should be
+able to debug his problem.
+2) can be addressed in two ways: preventing soft unamanged stack
+overflows from happening by doing some stack peeking in the
+managed->unmanaged wrappers or restoring the soft guard protection
+when returning from those same wrappers (this would be done only when
+needed using the already existing mechanism fro thread.abort)
+1) is harder to solve but corrently only needed when wanting to run
+untrusted code in a safe way


More information about the mono-bugs mailing list