diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2020-03-12 22:23:48 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2020-03-12 22:23:51 -0700 |
commit | 43e18c68f4d53767db7aae232ca46c2b400148cd (patch) | |
tree | ec9dde16e1a1c0a35cfd8a5d33b2b23fefb82b12 /mjit.c | |
parent | 8562bfd1501a69aa736ba4f699a77940b2cdd9b1 (diff) | |
download | ruby-43e18c68f4d53767db7aae232ca46c2b400148cd.tar.gz |
Mark all cc_entries associated to compiled_iseq
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1021,7 +1021,8 @@ mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body) { 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. |