gc: Execute run_final with the lock held
The finalizer table can't be read nor modified without the VM lock.
This commit is contained in:
parent
ec8900e3eb
commit
1e33a451bb
Notes:
git
2025-05-16 18:17:06 +00:00
@ -2857,9 +2857,9 @@ finalize_list(rb_objspace_t *objspace, VALUE zombie)
|
||||
next_zombie = RZOMBIE(zombie)->next;
|
||||
page = GET_HEAP_PAGE(zombie);
|
||||
|
||||
run_final(objspace, zombie);
|
||||
|
||||
int lev = rb_gc_vm_lock();
|
||||
|
||||
run_final(objspace, zombie);
|
||||
{
|
||||
GC_ASSERT(BUILTIN_TYPE(zombie) == T_ZOMBIE);
|
||||
GC_ASSERT(page->heap->final_slots_count > 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user