From 1df5ebf450b13427466c4e31fd3970c8430b6ac7 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 21 Nov 2013 06:33:41 +0000 Subject: * 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 --- thread_win32.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'thread_win32.c') diff --git a/thread_win32.c b/thread_win32.c index c203b556a3..9f851867c8 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) -- cgit v1.2.3