[PATCH] D60243: [LSan][AArch64] Speed-up leak-sanitizer on AArch64 for 47-bit VMA

Sebastian Pop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 20:02:56 PDT 2019


sebpop created this revision.
sebpop added a reviewer: kcc.
Herald added subscribers: kristof.beyls, javed.absar.
Herald added a project: LLVM.

This patch fixes https://github.com/google/sanitizers/issues/703
On a 47-bit VMA aarch64 machine the time spent in LSan reduced from 2.5s to 0.01s when running

clang -fsanitize=leak compiler-rt/test/lsan/TestCases/sanity_check_pure_c.c  && time ./a.out
The patch passes ninja check-all on that same aarch64 machine.

The patch is still a proof of concept on how to select at run time between the allocator32 and allocator64 following the size of the virtual address space on AArch64.
With this patch, LSan statically creates both the 32 and 64 allocators and selects at run time between the two following a global variable that is initialized at init time to whether the allocator64 can be used in the virtual address space.
There are some more places that need to be fixed in ASan and MSan once we agree on a way to dynamically select between allocators.


https://reviews.llvm.org/D60243

Files:
  compiler-rt/lib/lsan/lsan_allocator.cc
  compiler-rt/lib/lsan/lsan_allocator.h
  compiler-rt/lib/lsan/lsan_linux.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60243.193644.patch
Type: text/x-patch
Size: 9755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190404/304d39c9/attachment.bin>


More information about the llvm-commits mailing list