Add missing write barrier

We were missing the write barrier for class_value to cref. This should
fix the segv we were seeing in http://ci.rvm.jp/logfiles/brlog.trunk-gc-asserts.20230601-165052

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
This commit is contained in:
eileencodes 2023-06-02 15:26:02 -04:00 committed by Aaron Patterson
parent 40f090f433
commit 135a5eb716
Notes: git 2023-06-05 18:11:40 +00:00

View File

@ -1519,6 +1519,7 @@ update_classvariable_cache(const rb_iseq_t *iseq, VALUE klass, ID id, const rb_c
RUBY_ASSERT(BUILTIN_TYPE((VALUE)cref) == T_IMEMO && IMEMO_TYPE_P(cref, imemo_cref));
RB_OBJ_WRITTEN(iseq, Qundef, ent->cref);
RB_OBJ_WRITTEN(iseq, Qundef, ent->class_value);
RB_OBJ_WRITTEN(ent->class_value, Qundef, ent->cref);
return cvar_value;
}