[前][次][番号順一覧][スレッド一覧]

ruby-changes:55315

From: k0kubun <ko1@a...>
Date: Sat, 13 Apr 2019 15:27:58 +0900 (JST)
Subject: [ruby-changes:55315] k0kubun:r67522 (trunk): GET_CFP and ec->cfp are different

k0kubun	2019-04-13 15:27:52 +0900 (Sat, 13 Apr 2019)

  New Revision: 67522

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67522

  Log:
    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.

  Modified files:
    trunk/vm_insnhelper.c
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 67521)
+++ vm_insnhelper.c	(revision 67522)
@@ -3636,12 +3636,12 @@ vm_sendish( https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L3636
        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 {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]