Skip to content

Commit d34de3f

Browse files
Fix vm_weak_table_id_to_obj_foreach: st_insert
1 parent 5e5ccdb commit d34de3f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

gc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3698,7 +3698,11 @@ vm_weak_table_id_to_obj_foreach(st_data_t key, st_data_t value, st_data_t data)
36983698
VALUE new_value = (VALUE)value;
36993699
ret = iter_data->update_callback(&new_value, iter_data->data);
37003700
if (value != new_value) {
3701-
st_insert(id_to_obj_tbl, key, (st_data_t)new_value);
3701+
DURING_GC_COULD_MALLOC_REGION_START();
3702+
{
3703+
st_insert(id_to_obj_tbl, key, (st_data_t)new_value);
3704+
}
3705+
DURING_GC_COULD_MALLOC_REGION_END();
37023706
}
37033707
return ST_CONTINUE;
37043708
}

0 commit comments

Comments
 (0)