aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-06-09 12:38:46 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-06-09 12:40:50 +0900
commitf4950145cff638c4713e5cd06aead0e41c338e61 (patch)
tree9a4009747aae0d8b04bc42752b1045a18a3ec650
parentadfd4f3916df3e7becae28ff1eb5721900daf959 (diff)
downloadruby-f4950145cff638c4713e5cd06aead0e41c338e61.tar.gz
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.
-rw-r--r--mjit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mjit.c b/mjit.c
index f2443e027c..39de0e02c9 100644
--- a/mjit.c
+++ b/mjit.c
@@ -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));