diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-15 07:16:17 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-15 07:16:17 +0000 |
commit | e64e3c4c21361565fa03c49292e6918e0eb7f693 (patch) | |
tree | a97a34ce30cfb0d1b30424d8ea80b7f41072de78 /vm_insnhelper.c | |
parent | 9504610b25de8ed8656f169c8a3bf533b6acc7ae (diff) | |
download | ruby-e64e3c4c21361565fa03c49292e6918e0eb7f693.tar.gz |
Prohibit SystemStackError while GC.
* vm_insnhelper.c (rb_threadptr_stack_overflow): fatal on GC [Bug #13662]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index df9ea84d50..83ebe37124 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -56,8 +56,11 @@ NORETURN(void rb_threadptr_stack_overflow(rb_thread_t *th)); void rb_threadptr_stack_overflow(rb_thread_t *th) { + if (rb_during_gc()) { + rb_fatal("machine stack overflow while GC is running."); + } #ifdef USE_SIGALTSTACK - threadptr_stack_overflow(th, !rb_threadptr_during_gc(th)); + threadptr_stack_overflow(th, TRUE); #else threadptr_stack_overflow(th, FALSE); #endif |