summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-12 16:30:56 +0000
committerReid Kleckner <rnk@google.com>2017-05-12 16:30:56 +0000
commit07c0dd765466ed7d0b10c6c185e7fd61d545acd1 (patch)
tree02d61ac0eaf455a0f7cf2c03e00dfca12e2925e9
parent51416caf343a56754c06f64843eda12698f1a91a (diff)
downloadbcm5719-llvm-07c0dd765466ed7d0b10c6c185e7fd61d545acd1.tar.gz
bcm5719-llvm-07c0dd765466ed7d0b10c6c185e7fd61d545acd1.zip
[asan/win] Re-enable Win64 asan tests on Win8+
Our theory is that reserving large amounts of shadow memory isn't reliable on Win7 and earlier NT kernels. This affects the clang-x64-ninja-win7 buildbot, which uses Windows 7. llvm-svn: 302917
-rw-r--r--compiler-rt/test/asan/CMakeLists.txt17
1 files changed, 12 insertions, 5 deletions
diff --git a/compiler-rt/test/asan/CMakeLists.txt b/compiler-rt/test/asan/CMakeLists.txt
index b8e36522778..87fa9d13874 100644
--- a/compiler-rt/test/asan/CMakeLists.txt
+++ b/compiler-rt/test/asan/CMakeLists.txt
@@ -3,9 +3,17 @@ set(ASAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(ASAN_TESTSUITES)
set(ASAN_DYNAMIC_TESTSUITES)
-# FIXME: Shadow memory for 64-bit asan easily exhausts swap on most machines.
-# Find a way to make these tests pass reliably, and re-enable them.
-if(OS_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+# Before Windows 8 (CMAKE_SYSTEM_VERSION 6.2), reserving large regions of shadow
+# memory allocated physical memory for page tables, which made it very
+# unreliable. Remove the asan tests from check-all in this configuration.
+set(SHADOW_MAPPING_UNRELIABLE FALSE)
+if(OS_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND
+ ${CMAKE_SYSTEM_VERSION} LESS 6.2)
+ set(SHADOW_MAPPING_UNRELIABLE TRUE)
+ message(WARNING "Disabling ASan tests because they are unreliable on Windows 7 and earlier")
+endif()
+
+if (SHADOW_MAPPING_UNRELIABLE)
set(EXCLUDE_FROM_ALL TRUE)
endif()
@@ -165,7 +173,6 @@ if(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME)
endif()
# Reset EXCLUDE_FROM_ALL to its initial value.
-# FIXME: Remove when we run Win64 asan tests.
-if(OS_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+if (SHADOW_MAPPING_UNRELIABLE)
set(EXCLUDE_FROM_ALL FALSE)
endif()
OpenPOWER on IntegriCloud