Fix ASAN and don't check SPECIAL_CONST_P
Heap allocated objects are never special constants. Since we're walking the heap, we know none of these objects can be special. Also, adding the object to the freelist will poison the object, so we can't check that the type is T_NONE after poison.
This commit is contained in:
parent
664eeda66e
commit
d598654c74
3
gc.c
3
gc.c
@ -8727,7 +8727,6 @@ gc_ref_update(void *vstart, void *vend, size_t stride, void * data)
|
||||
|
||||
/* For each object on the page */
|
||||
for (; v != (VALUE)vend; v += stride) {
|
||||
if (!SPECIAL_CONST_P(v)) {
|
||||
void *poisoned = asan_poisoned_object_p(v);
|
||||
asan_unpoison_object(v, false);
|
||||
|
||||
@ -8751,11 +8750,9 @@ gc_ref_update(void *vstart, void *vend, size_t stride, void * data)
|
||||
}
|
||||
|
||||
if (poisoned) {
|
||||
GC_ASSERT(BUILTIN_TYPE(v) == T_NONE);
|
||||
asan_poison_object(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
page->free_slots = free_slots;
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user