[compiler-rt] r302917 - [asan/win] Re-enable Win64 asan tests on Win8+

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 09:30:56 PDT 2017


Author: rnk
Date: Fri May 12 11:30:56 2017
New Revision: 302917

URL: http://llvm.org/viewvc/llvm-project?rev=302917&view=rev
Log:
[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.

Modified:
    compiler-rt/trunk/test/asan/CMakeLists.txt

Modified: compiler-rt/trunk/test/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/CMakeLists.txt?rev=302917&r1=302916&r2=302917&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/asan/CMakeLists.txt Fri May 12 11:30:56 2017
@@ -3,9 +3,17 @@ set(ASAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_
 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()




More information about the llvm-commits mailing list