ruby-changes:46974
From: ko1 <ko1@a...>
Date: Thu, 15 Jun 2017 16:16:22 +0900 (JST)
Subject: [ruby-changes:46974] ko1:r59089 (trunk): Prohibit SystemStackError while GC.
ko1 2017-06-15 16:16:17 +0900 (Thu, 15 Jun 2017) New Revision: 59089 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59089 Log: Prohibit SystemStackError while GC. * vm_insnhelper.c (rb_threadptr_stack_overflow): fatal on GC [Bug #13662] Modified files: trunk/vm_insnhelper.c Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 59088) +++ vm_insnhelper.c (revision 59089) @@ -56,8 +56,11 @@ NORETURN(void rb_threadptr_stack_overflo https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L56 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/