diff options
author | 卜部昌平 <[email protected]> | 2020-06-09 12:38:46 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2020-06-09 12:40:50 +0900 |
commit | f4950145cff638c4713e5cd06aead0e41c338e61 (patch) | |
tree | 9a4009747aae0d8b04bc42752b1045a18a3ec650 /mjit.c | |
parent | adfd4f3916df3e7becae28ff1eb5721900daf959 (diff) |
mjit_mark_cc_entries: should consider VM_CALLCACHE_UNMARKABLE
Now that vm_empty_cc is VM_CALLCACHE_UNMARKABLE, it has to be properly
ruled out from being GCed.
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1082,7 +1082,7 @@ mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body) // 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) { + if (cc != NULL && vm_cc_markable(cc)) { // Pin `cc` and `cc->cme` against GC.compact as their addresses may be written in JIT-ed code. rb_gc_mark((VALUE)cc); rb_gc_mark((VALUE)vm_cc_cme(cc)); |