[PATCH] D39888: [lsan] Only use VM_MEMORY_OS_ALLOC_ONCE on Darwin versions that support it

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 11 02:28:01 PST 2017


ro added a comment.

Disabling lsan on Mac OS X < 10.9 (that's where I'd start) is going to be uglier than I first thought:

- On closer look, lsan wasn't even enabled inside the gcc tree.  The compilation error is coming from the lsan common part.  I think this can be addressed by allowing CAN_SANITIZE_LEAKS to be defined from the build environment, as gcc currently does via a local patch for CAN_SANITIZE_UB.  This way, I can add -DCAN_SANITIZE_LEAKS=0 for affected Darwin versions if I can figure out how to do this in the cmake framework.

- Besides, lsan needs to be disable completely in lib and test, following the lead of cxxabi_supported in the toplevel CMakeLists.txt.

Would it be enough to just handle the compiler-rt part like this or would I also have to reject -fsanitize=leak in clang?


https://reviews.llvm.org/D39888





More information about the llvm-commits mailing list