Add a missing asan_unpoisoning_p in gc_set_candidate_object_i
It walks the heap, and checks for T_NONE and T_ZOMBIE objects, so it needs to unpoison these slots before accessing them when ASAN is enabled.
This commit is contained in:
parent
75234beb24
commit
dc9d2455b6
2
gc.c
2
gc.c
@ -9362,6 +9362,7 @@ gc_set_candidate_object_i(void *vstart, void *vend, size_t stride, void *data)
|
||||
rb_objspace_t *objspace = &rb_objspace;
|
||||
VALUE v = (VALUE)vstart;
|
||||
for (; v != (VALUE)vend; v += stride) {
|
||||
asan_unpoisoning_object(v) {
|
||||
switch (BUILTIN_TYPE(v)) {
|
||||
case T_NONE:
|
||||
case T_ZOMBIE:
|
||||
@ -9377,6 +9378,7 @@ gc_set_candidate_object_i(void *vstart, void *vend, size_t stride, void *data)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user