diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 16:42:27 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-05 16:42:27 +0000 |
commit | 11c37ed390478393b0ba9b7afd41c92aae27ae05 (patch) | |
tree | 47767a2da8bc746b269f4df18d93f1d6814ab000 /compile.c | |
parent | b0569e3dde14df7b9acc703c6a4c7325573094f5 (diff) |
* compile.c (tailcallable_p): disable tail call optimization for
toplevel, eval, and load to avoid SEGV when interrupted by SIGINT.
[ruby-core:76327] [Bug #12576]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2423,6 +2423,10 @@ static inline int tailcallable_p(rb_iseq_t *iseq) { switch (iseq->body->type) { + case ISEQ_TYPE_TOP: + case ISEQ_TYPE_EVAL: + case ISEQ_TYPE_MAIN: + /* not tail callable because cfp will be over popped */ case ISEQ_TYPE_RESCUE: case ISEQ_TYPE_ENSURE: /* rescue block can't tail call because of errinfo */ |