diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-18 12:17:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-18 12:17:59 +0000 |
commit | a7bccb20f87978ec7c49191d88cf51d51770f44d (patch) | |
tree | 9a28cf12153bf2d826ca9bba6daf0ad40b975bec /vm_insnhelper.c | |
parent | bf210cfce952ff4127091843d6c5adb01dda2d28 (diff) |
vm_insnhelper.c: raise ruby_error_sysstack_gc
* vm_insnhelper.c (rb_threadptr_stack_overflow): rb_fatal is not
available during GC. raise the preallocated fatal error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 303f9cc2fb..03b9d49e0e 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -57,7 +57,9 @@ void rb_threadptr_stack_overflow(rb_thread_t *th) { if (rb_during_gc()) { - rb_fatal("machine stack overflow while GC is running."); + th->ec.raised_flag = RAISED_STACKOVERFLOW; + th->ec.errinfo = th->vm->special_exceptions[ruby_error_sysstack_gc]; + TH_JUMP_TAG(th, TAG_RAISE); } #ifdef USE_SIGALTSTACK threadptr_stack_overflow(th, TRUE); |