summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Snape <jamie.snape@kitware.com>2017-01-09 18:43:19 (GMT)
committerJamie Snape <jamie.snape@kitware.com>2017-01-09 18:43:19 (GMT)
commite537bd91129fc1616f787b64024f1b08d0f7ae45 (patch)
treeedee1fad63afc44c5dbba78ee09cc3d7923d21ff
parent0a2e588585a951b1f26cfa9094e0709f1d026b1e (diff)
downloadCMake-e537bd91129fc1616f787b64024f1b08d0f7ae45.zip
CMake-e537bd91129fc1616f787b64024f1b08d0f7ae45.tar.gz
CMake-e537bd91129fc1616f787b64024f1b08d0f7ae45.tar.bz2
ctest_memcheck: do not add detect_leaks=1 to ASAN_OPTIONS
-rw-r--r--Help/release/dev/ctest_memcheck-leak_sanitizer.rst5
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx1
2 files changed, 5 insertions, 1 deletions
diff --git a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst
index 60b4a22..3fa5c49 100644
--- a/Help/release/dev/ctest_memcheck-leak_sanitizer.rst
+++ b/Help/release/dev/ctest_memcheck-leak_sanitizer.rst
@@ -4,6 +4,11 @@ ctest_memcheck-leak_sanitizer
* The :command:`ctest_memcheck` command learned to support ``LeakSanitizer``
independently from ``AddressSanitizer``.
+* The :command:`ctest_memcheck` command no longer automatically adds
+ ``leak_check=1`` to the options used by ``AddressSanitizer``. The default
+ behavior of ``AddressSanitizer`` is to run `LeakSanitizer` to check leaks
+ unless ``leak_check=0``.
+
* The :command:`ctest_memcheck` command learned to read the location of
suppressions files for sanitizers from the
:variable:`CTEST_MEMORYCHECK_SUPPRESSIONS_FILE` variable.
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index fc07249..4d23e45 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -618,7 +618,6 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
if (this->MemoryTesterStyle ==
cmCTestMemCheckHandler::ADDRESS_SANITIZER) {
envVar = "ASAN_OPTIONS";
- extraOptions += ":detect_leaks=1";
} else if (this->MemoryTesterStyle ==
cmCTestMemCheckHandler::LEAK_SANITIZER) {
envVar = "LSAN_OPTIONS";