Unlock freelist before assigning

Co-authored-by: Matthew Draper <matthew@trebex.net>
This commit is contained in:
John Hawthorn 2023-12-12 20:57:02 -08:00
parent c1f4bfd41f
commit d7dad64465

2
gc.c
View File

@ -5395,7 +5395,9 @@ try_move(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *free_page,
* full */
return false;
}
asan_unlock_freelist(free_page);
free_page->freelist = RANY(dest)->as.free.next;
asan_lock_freelist(free_page);
GC_ASSERT(RB_BUILTIN_TYPE(dest) == T_NONE);