aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2023-06-02 15:26:02 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2023-06-05 11:11:12 -0700
commit135a5eb716399443da58db342de6093c91b5ad62 (patch)
tree2785a4d6471f09cf4f6a2dc1d4308e8e751fa0ec /vm_insnhelper.c
parent40f090f4339820d19da8ecdf81a981489c22eb57 (diff)
downloadruby-135a5eb716399443da58db342de6093c91b5ad62.tar.gz
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>
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 5ef1ad10de..cbcd51cce9 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -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;
}