Revert "[Asan] Accept __lsan_ignore_object for redzone pointer"
We still keep AddrIsInside. This reverts commit 1d70984fa220f966ddcecd7906c5f10368fe1b93.
This commit is contained in:
parent
b42fa0c040
commit
a8a85166d8
@ -1172,8 +1172,10 @@ void ForEachChunk(ForEachChunkCallback callback, void *arg) {
|
||||
IgnoreObjectResult IgnoreObjectLocked(const void *p) {
|
||||
uptr addr = reinterpret_cast<uptr>(p);
|
||||
__asan::AsanChunk *m = __asan::instance.GetAsanChunkByAddr(addr);
|
||||
if (!m || (atomic_load(&m->chunk_state, memory_order_acquire) !=
|
||||
__asan::CHUNK_ALLOCATED)) {
|
||||
if (!m ||
|
||||
(atomic_load(&m->chunk_state, memory_order_acquire) !=
|
||||
__asan::CHUNK_ALLOCATED) ||
|
||||
!m->AddrIsInside(addr)) {
|
||||
return kIgnoreObjectInvalid;
|
||||
}
|
||||
if (m->lsan_tag == kIgnored)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int *x, *y, *z;
|
||||
int *x, *y;
|
||||
|
||||
int main() {
|
||||
x = new int;
|
||||
@ -16,9 +16,6 @@ int main() {
|
||||
y = new int;
|
||||
}
|
||||
|
||||
z = new int;
|
||||
__lsan_ignore_object(z - 1);
|
||||
|
||||
x = y = z = nullptr;
|
||||
x = y = nullptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user