diff options
author | Brad King <brad.king@kitware.com> | 2015-02-19 16:35:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-19 16:35:51 (GMT) |
commit | 1d82105e29fc6f0bb71a474f876a7553b397cc26 (patch) | |
tree | 25918c24cedd897673f5f326497ad2b5f836a49f /Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake | |
parent | d7662141a771f105e64b56543d99ee43e7d00849 (diff) | |
download | CMake-1d82105e29fc6f0bb71a474f876a7553b397cc26.zip CMake-1d82105e29fc6f0bb71a474f876a7553b397cc26.tar.gz CMake-1d82105e29fc6f0bb71a474f876a7553b397cc26.tar.bz2 |
Tests: Rename RunCMake.{CTestMemcheck => ctest_memcheck}
Follow the convention of naming tests after the command they test.
Diffstat (limited to 'Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake')
-rw-r--r-- | Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake b/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake new file mode 100644 index 0000000..c87af9a --- /dev/null +++ b/Tests/RunCMake/ctest_memcheck/testMemorySanitizer.cmake @@ -0,0 +1,27 @@ +# this file simulates a program that has been built with thread sanitizer +# options + +message("MSAN_OPTIONS = [$ENV{MSAN_OPTIONS}]") +string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{MSAN_OPTIONS}") +message("LOG_FILE=[${LOG_FILE}]") + +# if we are not asked to simulate address sanitizer don't do it +if(NOT "$ENV{MSAN_OPTIONS}]" MATCHES "simulate_sanitizer.1") + return() +endif() +# clear the log file +file(REMOVE "${LOG_FILE}.2343") + +# create an error of each type of thread santizer +# these names come from tsan_report.cc in llvm + +file(APPEND "${LOG_FILE}.2343" +"================================================================= +==28423== WARNING: MemorySanitizer: use-of-uninitialized-value + #0 0x7f4364210dd9 in main (/home/kitware/msan/msan-bin/umr+0x7bdd9) + #1 0x7f4362d9376c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #2 0x7f4364210b0c in _start (/home/kitware/msan/msan-bin/umr+0x7bb0c) + +SUMMARY: MemorySanitizer: use-of-uninitialized-value ??:0 main +Exiting +") |