ruby-changes:36830
From: nobu <ko1@a...>
Date: Sun, 21 Dec 2014 11:35:56 +0900 (JST)
Subject: [ruby-changes:36830] nobu:r48911 (trunk): thread.c: no allocation during GC
nobu 2014-12-21 11:35:48 +0900 (Sun, 21 Dec 2014) New Revision: 48911 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48911 Log: thread.c: no allocation during GC * thread.c (ruby_thread_stack_overflow): jump without setting up the exception not to allocate new objects, during GC. Modified files: trunk/thread.c Index: thread.c =================================================================== --- thread.c (revision 48910) +++ thread.c (revision 48911) @@ -2080,11 +2080,12 @@ ruby_thread_stack_overflow(rb_thread_t * https://github.com/ruby/ruby/blob/trunk/thread.c#L2080 { th->raised_flag = 0; #ifdef USE_SIGALTSTACK - rb_exc_raise(sysstack_error); -#else + if (!rb_during_gc()) { + rb_exc_raise(sysstack_error); + } +#endif th->errinfo = sysstack_error; TH_JUMP_TAG(th, TAG_RAISE); -#endif } int -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/