diff options
author | KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au> | 2024-01-28 17:18:36 +1100 |
---|---|---|
committer | KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au> | 2024-02-06 22:23:42 +1100 |
commit | 4f4f3a6dec253af7d8f138877cc80fb70c617654 (patch) | |
tree | d79040f214555a8fda1a3609d840293702896134 /gc.c | |
parent | 719db18b50a996f3df4f76854f7dc9d69f875582 (diff) |
Don't check __asan_region_is_poisoned in objspace_each_objects
This returns whether or not _any_ piece of memory in the range is
poisoned, not if _all_ of it is. That means that currently, with ASAN
enabled, pages which contain a single poisoned object are skipped
entirely from being iterated with objspace_each* family of functions.
[Bug #20220]
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -3984,15 +3984,13 @@ objspace_each_objects_try(VALUE arg) uintptr_t pstart = (uintptr_t)page->start; uintptr_t pend = pstart + (page->total_slots * size_pool->slot_size); - if (!__asan_region_is_poisoned((void *)pstart, pend - pstart)) { - if (data->each_obj_callback && - (*data->each_obj_callback)((void *)pstart, (void *)pend, size_pool->slot_size, data->data)) { - break; - } - if (data->each_page_callback && - (*data->each_page_callback)(page, data->data)) { - break; - } + if (data->each_obj_callback && + (*data->each_obj_callback)((void *)pstart, (void *)pend, size_pool->slot_size, data->data)) { + break; + } + if (data->each_page_callback && + (*data->each_page_callback)(page, data->data)) { + break; } page = ccan_list_next(&SIZE_POOL_EDEN_HEAP(size_pool)->pages, page, page_node); |