summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-15 07:16:17 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-15 07:16:17 +0000
commite64e3c4c21361565fa03c49292e6918e0eb7f693 (patch)
treea97a34ce30cfb0d1b30424d8ea80b7f41072de78
parent9504610b25de8ed8656f169c8a3bf533b6acc7ae (diff)
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
-rw-r--r--vm_insnhelper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index df9ea84..83ebe37 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