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

ruby-changes:60379

From: Takashi <ko1@a...>
Date: Fri, 13 Mar 2020 14:25:02 +0900 (JST)
Subject: [ruby-changes:60379] 43e18c68f4 (master): Mark all cc_entries associated to compiled_iseq

https://git.ruby-lang.org/ruby.git/commit/?id=43e18c68f4

From 43e18c68f4d53767db7aae232ca46c2b400148cd Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Thu, 12 Mar 2020 22:23:48 -0700
Subject: Mark all cc_entries associated to compiled_iseq


diff --git a/mjit.c b/mjit.c
index 02a74a6..b03d92c 100644
--- a/mjit.c
+++ b/mjit.c
@@ -1021,7 +1021,8 @@ mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body) https://github.com/ruby/ruby/blob/trunk/mjit.c#L1021
 {
     const struct rb_callcache **cc_entries;
     if (body->jit_unit && (cc_entries = body->jit_unit->cc_entries) != NULL) {
-        for (unsigned int i = 0; i < body->ci_size; i++) {
+        // It must be `body->jit_unit->cc_entries_size` instead of `body->ci_size` to mark children's cc_entries
+        for (unsigned int i = 0; i < body->jit_unit->cc_entries_size; i++) {
             const struct rb_callcache *cc = cc_entries[i];
             if (cc != NULL) {
                 // Pin `cc` and `cc->cme` against GC.compact as their addresses may be written in JIT-ed code.
-- 
cgit v0.10.2


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

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