From 0562459473f44c270784074a09a33ea30d68e457 Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Wed, 25 Aug 2021 16:51:41 -0400 Subject: [PATCH] Redo the ivtable lookp once the ivar is set --- yjit_codegen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yjit_codegen.c b/yjit_codegen.c index aaac15b1cb..abb6e6d3dd 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -1446,7 +1446,9 @@ gen_get_ivar(jitstate_t *jit, ctx_t *ctx, const int max_chain_depth, VALUE compt if (!iv_index_tbl || !rb_iv_index_tbl_lookup(iv_index_tbl, id, &ent)) { rb_ivar_set(comptime_receiver, id, Qundef); iv_index_tbl = ROBJECT_IV_INDEX_TBL(comptime_receiver); - RUBY_ASSERT(iv_index_tbl && rb_iv_index_tbl_lookup(iv_index_tbl, id, &ent)); + RUBY_ASSERT(iv_index_tbl); + // Redo the lookup + RUBY_ASSERT_ALWAYS(rb_iv_index_tbl_lookup(iv_index_tbl, id, &ent)); } uint32_t ivar_index = ent->index;