diff options
author | Brad King <brad.king@kitware.com> | 2017-01-25 13:41:21 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-25 13:41:21 (GMT) |
commit | 54790e77d7401cc50fd6dce584aa00985aa94ac5 (patch) | |
tree | 5f836ea04f2b0a3c5dc13e0152e8d715889bb803 /Source | |
parent | 4f37987e3fd72b957d45e741e6ee70ccf42b167d (diff) | |
parent | e116f2a5de330ca4dd413e29db62ed39805b2c06 (diff) | |
download | CMake-54790e77d7401cc50fd6dce584aa00985aa94ac5.zip CMake-54790e77d7401cc50fd6dce584aa00985aa94ac5.tar.gz CMake-54790e77d7401cc50fd6dce584aa00985aa94ac5.tar.bz2 |
Merge topic 'sanitizer-options'
e116f2a5 ctest_memcheck: Fix sanitizers when MemoryCheckSanitizerOptions is empty
522e1588 Tests: Use CTEST_MEMORYCHECK_SANITIZER_OPTIONS where appropriate
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index a062e64..620e237 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -607,9 +607,13 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() this->MemoryTesterDynamicOptions.push_back("-E"); this->MemoryTesterDynamicOptions.push_back("env"); std::string envVar; - std::string extraOptions = ":" + - this->CTest->GetCTestConfiguration("MemoryCheckSanitizerOptions"); + std::string extraOptions; std::string suppressionsOption; + if (!this->CTest->GetCTestConfiguration("MemoryCheckSanitizerOptions") + .empty()) { + extraOptions = ":" + + this->CTest->GetCTestConfiguration("MemoryCheckSanitizerOptions"); + } if (!this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile") .empty()) { suppressionsOption = ":suppressions=" + @@ -631,8 +635,10 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() cmCTestMemCheckHandler::UB_SANITIZER) { envVar = "UBSAN_OPTIONS"; } + // Quote log_path with single quotes; see + // https://bugs.chromium.org/p/chromium/issues/detail?id=467936 std::string outputFile = - envVar + "=log_path=\"" + this->MemoryTesterOutputFile + "\""; + envVar + "=log_path='" + this->MemoryTesterOutputFile + "'"; this->MemoryTesterEnvironmentVariable = outputFile + suppressionsOption + extraOptions; break; |