aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-08-12 13:56:40 -0700
committerGitHub <noreply@github.com>2024-08-12 13:56:40 -0700
commit652707a6457eeb3927a1fe82e6b2cbc2a1fa22f5 (patch)
tree42ef9911c331f0c03bb8195f1219080babe8b907 /clang/lib/CodeGen/CodeGenFunction.cpp
parent91c3a718b28c92c95343e7073fbddc39a181a801 (diff)
downloadllvm-652707a6457eeb3927a1fe82e6b2cbc2a1fa22f5.zip
llvm-652707a6457eeb3927a1fe82e6b2cbc2a1fa22f5.tar.gz
llvm-652707a6457eeb3927a1fe82e6b2cbc2a1fa22f5.tar.bz2
[nsan] Use sanitizer allocator
* The performance is better than the glibc allocator. * Allocator interface functions, sanitizer allocator options, and MallocHooks/FreeHooks are supported. * Shadow memory has specific memory layout requirement. Using libc allocator could lead to conflicts. * When we add a mmap interceptor for reliability (the VMA could reuse a previously released VMA that is poisoned): glibc may invoke an internal system call to call unmmap, which cannot be intercepted. We will not be able to return the shadow memory to the OS. Similar to dfsan https://reviews.llvm.org/D101204 . Also intercept operator new/delete to be similar to other sanitizers using the sanitizer allocator. The align_val_t overload of operator new has slightly less overhead. Pull Request: https://github.com/llvm/llvm-project/pull/102764
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions