From 639e28fc2edc95f1c5992e2ac8232fd38c2b44b4 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sat, 3 Aug 2019 21:21:25 +0200 Subject: [PATCH] qa.sh: Enable LeakSanitizer --- expat/qa.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/expat/qa.sh b/expat/qa.sh index f745707c..5dd39512 100755 --- a/expat/qa.sh +++ b/expat/qa.sh @@ -57,6 +57,11 @@ populate_environment() { # http://clang.llvm.org/docs/AddressSanitizer.html BASE_COMPILE_FLAGS+=" -g -fsanitize=address -fno-omit-frame-pointer -fno-common" BASE_LINK_FLAGS+=" -g -fsanitize=address" + # macOS's XCode does not support LeakSanitizer and reports error: + # AddressSanitizer: detect_leaks is not supported on this platform. + if [[ "$(uname -s)" != Darwin* ]]; then + export ASAN_OPTIONS=detect_leaks=1 + fi ;; memory) # http://clang.llvm.org/docs/MemorySanitizer.html