[llvm-branch-commits] [nsan] Use sanitizer allocator (PR #102764)

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Aug 10 10:37:43 PDT 2024


https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/102764

* 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 intercept mmap 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





More information about the llvm-branch-commits mailing list