ruby-changes:45220
From: nobu <ko1@a...>
Date: Mon, 9 Jan 2017 11:55:43 +0900 (JST)
Subject: [ruby-changes:45220] nobu:r57293 (trunk): vm_insnhelper.c: block argument at tailcall
nobu 2017-01-09 11:55:39 +0900 (Mon, 09 Jan 2017) New Revision: 57293 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57293 Log: 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] Modified files: trunk/vm_insnhelper.c Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 57292) +++ vm_insnhelper.c (revision 57293) @@ -1538,8 +1538,6 @@ vm_call_iseq_setup_tailcall(rb_thread_t https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1538 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 https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1556 iseq->body->stack_max); cfp->sp = sp_orig; + RUBY_VM_CHECK_INTS(th); + return Qundef; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/