From 84d1a99a3fc76b4bcd5fc382e5b30a466b124493 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Tue, 25 Feb 2020 13:37:52 +0900 Subject: should be initialize jit_unit->cc_entries. GC can invoke just after allocation of jit_unit->cc_entries so it should be zero-cleared. --- mjit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mjit.c') diff --git a/mjit.c b/mjit.c index bcf773d2d7..d2142d9913 100644 --- a/mjit.c +++ b/mjit.c @@ -295,7 +295,7 @@ create_unit(const rb_iseq_t *iseq) unit->id = current_unit_num++; unit->iseq = (rb_iseq_t *)iseq; if (iseq->body->ci_size > 0) { - unit->cc_entries = ALLOC_N(const struct rb_callcache *, iseq->body->ci_size); + unit->cc_entries = ZALLOC_N(const struct rb_callcache *, iseq->body->ci_size); } iseq->body->jit_unit = unit; } -- cgit v1.2.3