[PATCH] D36757: Add C++17 aligned new/delete interceptors to standalone lsan

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 15:09:21 PDT 2017


alekseyshl added inline comments.


================
Comment at: lib/lsan/lsan_interceptors.cc:207
   GET_STACK_TRACE_MALLOC;                                  \
-  void *res = Allocate(stack, size, 1, kAlwaysClearMemory);\
-  if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();\
+  void *res = lsan_memalign(1, size, stack);               \
+  if (!nothrow && UNLIKELY(!res)) DieOnFailure::OnOOM();   \
----------------
Use lsan_malloc instead of lsan_memalign, one less parameter and check.


https://reviews.llvm.org/D36757





More information about the llvm-commits mailing list