1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix ASAN error in GC

This commit is contained in:
Aaron Patterson 2022-10-28 16:10:45 -07:00
parent 9b462aec4a
commit 5e0432f59b
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6

2
gc.c
View file

@ -5217,7 +5217,9 @@ try_move(rb_objspace_t *objspace, rb_heap_t *heap, struct heap_page *free_page,
if (gc_is_moveable_obj(objspace, src)) {
GC_ASSERT(MARKED_IN_BITMAP(GET_HEAP_MARK_BITS(src), src));
asan_unlock_freelist(free_page);
VALUE dest = (VALUE)free_page->freelist;
asan_lock_freelist(free_page);
asan_unpoison_object(dest, false);
if (!dest) {
/* if we can't get something from the freelist then the page must be