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