From dd8372b3f3290572a8b26eaa272f9a7131d164ca Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Wed, 19 Jul 2023 21:59:17 +0100 Subject: [PATCH] cvc table entries can move --- gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gc.c b/gc.c index d96124003f..3134c5a8cd 100644 --- a/gc.c +++ b/gc.c @@ -10271,12 +10271,13 @@ update_cvc_tbl(rb_objspace_t *objspace, VALUE klass) static enum rb_id_table_iterator_result mark_cvc_tbl_i(VALUE cvc_entry, void *data) { + rb_objspace_t *objspace = (rb_objspace_t *)data; struct rb_cvar_class_tbl_entry *entry; entry = (struct rb_cvar_class_tbl_entry *)cvc_entry; RUBY_ASSERT(entry->cref == 0 || (BUILTIN_TYPE((VALUE)entry->cref) == T_IMEMO && IMEMO_TYPE_P(entry->cref, imemo_cref))); - rb_gc_mark((VALUE) entry->cref); + gc_mark(objspace, (VALUE) entry->cref); return ID_TABLE_CONTINUE; }