summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-02-25 13:37:52 +0900
committerKoichi Sasada <ko1@atdot.net>2020-02-25 13:37:52 +0900
commit84d1a99a3fc76b4bcd5fc382e5b30a466b124493 (patch)
tree661bbc796e6dc2d9cc538d09864fbed35cac57d9 /iseq.c
parent670b7be6c5fb9c3438fb6e36070401f25806f725 (diff)
should be initialize jit_unit->cc_entries.
GC can invoke just after allocation of jit_unit->cc_entries so it should be zero-cleared.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index 25f45a767f..40be6c76c4 100644
--- a/iseq.c
+++ b/iseq.c
@@ -363,7 +363,9 @@ rb_iseq_mark(const rb_iseq_t *iseq)
// TODO: move to mjit.c?
for (unsigned int i=0; i<body->ci_size; i++) {
const struct rb_callcache *cc = body->jit_unit->cc_entries[i];
- rb_gc_mark((VALUE)cc); // pindown
+ if (cc != NULL) {
+ rb_gc_mark((VALUE)cc); // pindown
+ }
}
}
#endif