mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d33830308f
commit
3600b5e6f7
1 changed files with 4 additions and 3 deletions
7
thread.c
7
thread.c
|
@ -2080,11 +2080,12 @@ ruby_thread_stack_overflow(rb_thread_t *th)
|
|||
{
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue