cvc table entries can move

This commit is contained in:
Matt Valentine-House 2023-07-19 21:59:17 +01:00
parent 62cb739ba5
commit dd8372b3f3
Notes: git 2023-07-20 12:39:17 +00:00

3
gc.c
View File

@ -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;
}