summaryrefslogtreecommitdiff
path: root/thread_win32.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-21 06:33:41 (GMT)
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-21 06:33:41 (GMT)
commit1df5ebf450b13427466c4e31fd3970c8430b6ac7 (patch)
tree4daa8678f0f8dad8d416b52e7707397061842945 /thread_win32.c
parent6869a65a8c6801984ae5bfc1b793843933925ef6 (diff)
* eval_intern.h (SAVE_ROOT_JMPBUF): workaround for the failure of
test/ruby/test_exception.rb on Windows. wrap by __try and __exception statements on mswin to raise SIGSEGV when EXCEPTION_STACK_OVERFLOW is occurred, because MSVCRT doesn't handle the exception. however, (1) mingw-gcc doesn't support __try and __exception statements, and (2) we cannot retry SystemStackError after this change yet (maybe crashed) because SEH and longjmp() are too uncongenial. * signal.c (check_stack_overflow, CHECK_STACK_OVERFLOW): now defined on Windows, too. * thread_win32.c (ruby_stack_overflowed_p): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_win32.c')
-rw-r--r--thread_win32.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/thread_win32.c b/thread_win32.c
index c203b55..9f85186 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -748,6 +748,12 @@ native_reset_timer_thread(void)
}
}
+int
+ruby_stack_overflowed_p(const rb_thread_t *th, const void *addr)
+{
+ return rb_thread_raised_p(th, RAISED_STACKOVERFLOW);
+}
+
#ifdef RUBY_ALLOCA_CHKSTK
void
ruby_alloca_chkstk(size_t len, void *sp)