From ca21eed6ebbceca68daa7b2a88e69a58b8d56806 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Thu, 25 Nov 2021 12:18:15 +0900 Subject: [PATCH] fix assertion on `gc_cc_cme()` `cc->cme_` can be NULL when it is not initialized yet. It can be observed on `GC.stress == true` running. --- vm_callinfo.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm_callinfo.h b/vm_callinfo.h index b3aafd6de1..700fd3dc6c 100644 --- a/vm_callinfo.h +++ b/vm_callinfo.h @@ -334,7 +334,9 @@ static inline const struct rb_callable_method_entry_struct * vm_cc_cme(const struct rb_callcache *cc) { VM_ASSERT(IMEMO_TYPE_P(cc, imemo_callcache)); - VM_ASSERT(!vm_cc_markable(cc) || cc->cme_ != NULL); + VM_ASSERT(cc->call_ == NULL || // not initialized yet + !vm_cc_markable(cc) || + cc->cme_ != NULL); return cc->cme_; }