CHUNK_ALLOCATED. CHUNK_QUARANTINE are only states
which make AsanChunk useful for GetAsanChunk callers.
In either case member of AsanChunk are not useful.
Fix few cases which didn't expect nullptr. Most of the callers are already
expects nullptr.
Paths
| Differential D87135
[Asan] Return nullptr for invalid chunks ClosedPublic Authored by vitalybuka on Sep 4 2020, 4:08 AM.
Details
Summary CHUNK_ALLOCATED. CHUNK_QUARANTINE are only states Fix few cases which didn't expect nullptr. Most of the callers are already
Diff Detail
Event Timelinevitalybuka retitled this revision from [Asan] GetAsanChunk returns nullptr for CHUNK_INVALID to [Asan] Return nullptr for CHUNK_INVALID. vitalybuka added a child revision: D86932: [NFC][Asan] Don't use allocator Metadata.Sep 4 2020, 4:19 AM vitalybuka added a child revision: D87217: [Asan] Fix __asan_update_allocation_context.Sep 6 2020, 7:17 PM
vitalybuka retitled this revision from [Asan] Return nullptr for CHUNK_INVALID to [Asan] Return nullptr for invalid chunks.Sep 8 2020, 11:49 PM
vitalybuka removed a child revision: D86932: [NFC][Asan] Don't use allocator Metadata.Sep 9 2020, 3:59 AM This revision is now accepted and ready to land.Sep 9 2020, 2:03 PM Closed by commit rG91c28bbe74f2: [Asan] Return nullptr for invalid chunks (authored by vitalybuka). · Explain WhySep 9 2020, 4:32 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 289913 compiler-rt/lib/asan/asan_allocator.cpp
|
Are we guaranteed that chunk_state == CHUNK_INVALID when p = alloc_beg?
If so, this seems tricky. Please add a comment explaining why this is the case.