summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2023-12-12 20:57:02 -0800
committerJohn Hawthorn <john@hawthorn.email>2023-12-13 15:26:52 -0800
commitd7dad644658697a05949b66e736a34fb772771de (patch)
tree386bf815fb29600d65152898618230b0bedf6af2 /gc.c
parentc1f4bfd41fa7e1fa23ef6803349ac009debdf61f (diff)
Unlock freelist before assigning
Co-authored-by: Matthew Draper <matthew@trebex.net>
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 59c9162a89..14bbf64942 100644
--- a/gc.c
+++ b/gc.c
@@ -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);