mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 22:58:41 +00:00
MEMORYCHECK_SUPPRESSIONS_FILE: add support for sanitizers
This commit is contained in:
parent
cf590c1236
commit
cdacfbd255
@ -3,3 +3,7 @@ ctest_memcheck-leak_sanitizer
|
||||
|
||||
* The :command:`ctest_memcheck` command learned to support ``LeakSanitizer``
|
||||
independently from ``AddressSanitizer``.
|
||||
|
||||
* The :command:`ctest_memcheck` command learned to read the location of
|
||||
suppressions files for sanitizers from the
|
||||
:variable:`CTEST_MEMORYCHECK_SUPPRESSIONS_FILE` variable.
|
||||
|
@ -609,6 +609,12 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
|
||||
std::string envVar;
|
||||
std::string extraOptions =
|
||||
this->CTest->GetCTestConfiguration("MemoryCheckSanitizerOptions");
|
||||
std::string suppressionsOption;
|
||||
if (!this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile")
|
||||
.empty()) {
|
||||
suppressionsOption = " suppressions=" +
|
||||
this->CTest->GetCTestConfiguration("MemoryCheckSuppressionFile");
|
||||
}
|
||||
if (this->MemoryTesterStyle ==
|
||||
cmCTestMemCheckHandler::ADDRESS_SANITIZER) {
|
||||
envVar = "ASAN_OPTIONS";
|
||||
@ -628,7 +634,8 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
|
||||
}
|
||||
std::string outputFile =
|
||||
envVar + "=log_path=\"" + this->MemoryTesterOutputFile + "\" ";
|
||||
this->MemoryTesterEnvironmentVariable = outputFile + extraOptions;
|
||||
this->MemoryTesterEnvironmentVariable =
|
||||
outputFile + extraOptions + suppressionsOption;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user