diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-21 02:35:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-21 02:35:48 +0000 |
commit | 3600b5e6f749559d7036792032852a1fbb3a1193 (patch) | |
tree | 71ed99e35c966fd2b529b8c41ab62f76e3682a16 | |
parent | d33830308f79150f362f42e32d5a653c094e745a (diff) | |
download | ruby-3600b5e6f749559d7036792032852a1fbb3a1193.tar.gz |
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
-rw-r--r-- | thread.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |