diff options
Diffstat (limited to 'thread.c')
| -rw-r--r-- | thread.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1300,12 +1300,21 @@ rb_threadptr_signal_exit(rb_thread_t *th) rb_threadptr_raise(th->vm->main_thread, 2, argv); } +#if defined(POSIX_SIGNAL) && defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) +#define USE_SIGALTSTACK +#endif + void ruby_thread_stack_overflow(rb_thread_t *th) { - th->errinfo = sysstack_error; th->raised_flag = 0; +#ifdef USE_SIGALTSTACK + th->raised_flag = 0; + rb_exc_raise(sysstack_error); +#else + th->errinfo = sysstack_error; TH_JUMP_TAG(th, TAG_RAISE); +#endif } int |
