1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
ko1 2017-06-15 07:16:17 +00:00
parent 9504610b25
commit e64e3c4c21

View file

@ -56,8 +56,11 @@ NORETURN(void rb_threadptr_stack_overflow(rb_thread_t *th));
void void
rb_threadptr_stack_overflow(rb_thread_t *th) rb_threadptr_stack_overflow(rb_thread_t *th)
{ {
if (rb_during_gc()) {
rb_fatal("machine stack overflow while GC is running.");
}
#ifdef USE_SIGALTSTACK #ifdef USE_SIGALTSTACK
threadptr_stack_overflow(th, !rb_threadptr_during_gc(th)); threadptr_stack_overflow(th, TRUE);
#else #else
threadptr_stack_overflow(th, FALSE); threadptr_stack_overflow(th, FALSE);
#endif #endif