[compiler-rt] a803ddc - [NFC][Asan] Add FIXME into GetAsanChunk
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 18:50:22 PDT 2020
Author: Vitaly Buka
Date: 2020-09-03T18:50:09-07:00
New Revision: a803ddc522ed69d103d6b6feef0318a2d16d53a7
URL: https://github.com/llvm/llvm-project/commit/a803ddc522ed69d103d6b6feef0318a2d16d53a7
DIFF: https://github.com/llvm/llvm-project/commit/a803ddc522ed69d103d6b6feef0318a2d16d53a7.diff
LOG: [NFC][Asan] Add FIXME into GetAsanChunk
Added:
Modified:
compiler-rt/lib/asan/asan_allocator.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_allocator.cpp b/compiler-rt/lib/asan/asan_allocator.cpp
index 448dece0a170..16b264080b5a 100644
--- a/compiler-rt/lib/asan/asan_allocator.cpp
+++ b/compiler-rt/lib/asan/asan_allocator.cpp
@@ -744,6 +744,9 @@ struct Allocator {
uptr *alloc_magic = reinterpret_cast<uptr *>(alloc_beg);
if (alloc_magic[0] == kAllocBegMagic)
return reinterpret_cast<AsanChunk *>(alloc_magic[1]);
+ // FIXME: This is either valid small chunk with tiny redzine or invalid
+ // chunk which is beeing allocated/deallocated. The latter case should
+ // return nullptr like secondary allocator does.
return reinterpret_cast<AsanChunk *>(alloc_beg);
}
More information about the llvm-commits
mailing list