Disable TLS destructor tests on Win x64 incremental
The linker is coalescing sections incorrectly (x64-only,
incremental-only), so disable these tests for now in that
configuration. See crbug.com/251251 for more details.
Upstream toolchain bug at https://connect.microsoft.com/VisualStudio/feedbackdetail/view/967992
[email protected]
BUG=251251
Review URL: https://codereview.chromium.org/580213002
Cr-Commit-Position: refs/heads/master@{#295770}
diff --git a/base/threading/thread_local_storage_unittest.cc b/base/threading/thread_local_storage_unittest.cc
index e295c89..1bf71d1dd 100644
--- a/base/threading/thread_local_storage_unittest.cc
+++ b/base/threading/thread_local_storage_unittest.cc
@@ -79,12 +79,17 @@
EXPECT_EQ(value, 123);
}
-#if defined(THREAD_SANITIZER)
+#if defined(THREAD_SANITIZER) || \
+ (defined(OS_WIN) && defined(ARCH_CPU_X86_64) && \
+ defined(INCREMENTAL_LINKING))
// Do not run the test under ThreadSanitizer. Because this test iterates its
// own TSD destructor for the maximum possible number of times, TSan can't jump
// in after the last destructor invocation, therefore the destructor remains
// unsynchronized with the following users of the same TSD slot. This results
// in race reports between the destructor and functions in other tests.
+//
+// It is disabled on Win x64 with incremental linking pending resolution of
+// http://crbug.com/251251.
#define MAYBE_TLSDestructors DISABLED_TLSDestructors
#else
#define MAYBE_TLSDestructors TLSDestructors