summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-11 16:24:17 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-11 16:24:17 +0000
commit66487605cf68c5f467c1ca54db4dbee294f6eb47 (patch)
treecaf22c0300cb6ee175a9bf5e41a0a8c10fdcfc09 /vm_insnhelper.c
parentd4f4ba6f032f1de0db75cf1d1c4d794ef6d50c3f (diff)
merge revision(s) 57293: [Backport #13107]
vm_insnhelper.c: block argument at tailcall * vm_insnhelper.c (vm_call_iseq_setup_tailcall): check interrupts after set up the new frame, not the passed block to be clobbered by invoked finalizers and so on. [ruby-core:78981] [Bug #13107] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index b580412bb9..662a2d6456 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1538,8 +1538,6 @@ vm_call_iseq_setup_tailcall(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_
vm_pop_frame(th, cfp, cfp->ep);
cfp = th->cfp;
- RUBY_VM_CHECK_INTS(th);
-
sp_orig = sp = cfp->sp;
/* push self */
@@ -1558,6 +1556,8 @@ vm_call_iseq_setup_tailcall(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_
iseq->body->stack_max);
cfp->sp = sp_orig;
+ RUBY_VM_CHECK_INTS(th);
+
return Qundef;
}