diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 06:33:41 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-21 06:33:41 +0000 |
commit | 1df5ebf450b13427466c4e31fd3970c8430b6ac7 (patch) | |
tree | 4daa8678f0f8dad8d416b52e7707397061842945 /signal.c | |
parent | 6869a65a8c6801984ae5bfc1b793843933925ef6 (diff) | |
download | ruby-1df5ebf450b13427466c4e31fd3970c8430b6ac7.tar.gz |
* 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 'signal.c')
-rw-r--r-- | signal.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -627,7 +627,7 @@ rb_get_next_signal(void) } -#ifdef USE_SIGALTSTACK +#if defined(USE_SIGALTSTACK) || defined(_WIN32) static void check_stack_overflow(const void *addr) { @@ -638,7 +638,11 @@ check_stack_overflow(const void *addr) ruby_thread_stack_overflow(th); } } +#ifdef _WIN32 +#define CHECK_STACK_OVERFLOW() check_stack_overflow(0) +#else #define CHECK_STACK_OVERFLOW() check_stack_overflow(info->si_addr) +#endif #else #define CHECK_STACK_OVERFLOW() (void)0 #endif |