tsan: fix windows build
authorDmitry Vyukov <dvyukov@google.com>
Wed, 20 Jul 2016 12:50:49 +0000 (12:50 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Wed, 20 Jul 2016 12:50:49 +0000 (12:50 +0000)
It's only asan that installs vectored SEH handler to map memory lazily.

llvm-svn: 276112

compiler-rt/lib/sanitizer_common/sanitizer_win.cc

index f762731..d897559 100644 (file)
@@ -173,10 +173,10 @@ void *MmapFixedNoReserve(uptr fixed_addr, uptr size, const char *name) {
   // FIXME: is this really "NoReserve"? On Win32 this does not matter much,
   // but on Win64 it does.
   (void)name;  // unsupported
-#if SANITIZER_WINDOWS64
-  // On Windows64, use MEM_COMMIT would result in error
+#if !SANITIZER_GO && SANITIZER_WINDOWS64
+  // On asan/Windows64, use MEM_COMMIT would result in error
   // 1455:ERROR_COMMITMENT_LIMIT.
-  // We use exception handler to commit page on demand.
+  // Asan uses exception handler to commit page on demand.
   void *p = VirtualAlloc((LPVOID)fixed_addr, size, MEM_RESERVE, PAGE_READWRITE);
 #else
   void *p = VirtualAlloc((LPVOID)fixed_addr, size, MEM_RESERVE | MEM_COMMIT,