qa.sh: Enable LeakSanitizer

This commit is contained in:
Sebastian Pipping 2019-08-03 21:21:25 +02:00
parent 9ab26c18fd
commit 639e28fc2e

View File

@ -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