1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

GET_CFP and ec->cfp are different

When reviewing r66565, I overlooked that `GET_ISEQ()` and `GET_EP()` are
NOT `ec->cfp->iseq` and `ec->cfp->ep` but `reg_cfp->iseq` and
`reg_cfp->ep`.

`vm_push_frame` updates `ec->cfp` and in this case we want to check the
callee's cfp and so `ec->cfp` should be checked instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2019-04-13 06:27:52 +00:00
parent e7f7aa8742
commit 30f71f4768

View file

@ -3636,12 +3636,12 @@ vm_sendish(
frame may have stack values in the local variables and the
cancelling the caller frame will purge them. But directly
calling mjit_exec is faster... */
if (GET_ISEQ()->body->catch_except_p) {
VM_ENV_FLAGS_SET(GET_EP(), VM_FRAME_FLAG_FINISH);
if (ec->cfp->iseq->body->catch_except_p) {
VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);
return vm_exec(ec, true);
}
else if ((val = mjit_exec(ec)) == Qundef) {
VM_ENV_FLAGS_SET(GET_EP(), VM_FRAME_FLAG_FINISH);
VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);
return vm_exec(ec, false);
}
else {