Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: Source/wtf/Atomics.h

Issue 556863005: Attempt to fix the asan/win build. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Atomics.h
diff --git a/Source/wtf/Atomics.h b/Source/wtf/Atomics.h
index df9e9750eb5d42035c2ef484a573c6774221195a..fb36bf6fb042a60996f0b929c3fc58b377e696c4 100644
--- a/Source/wtf/Atomics.h
+++ b/Source/wtf/Atomics.h
@@ -187,19 +187,28 @@ ALWAYS_INLINE unsigned acquireLoad(volatile const unsigned* ptr)
#if defined(ADDRESS_SANITIZER)
-__attribute__((no_sanitize_address)) ALWAYS_INLINE void asanUnsafeReleaseStore(volatile unsigned* ptr, unsigned value)
+// FIXME: See comment on NO_SANITIZE_ADDRESS in platform/heap/AddressSanitizer.h
+#if !OS(WIN) || COMPILER(CLANG)
+#define NO_SANITIZE_ADDRESS_ATOMICS __attribute__((no_sanitize_address))
+#else
+#define NO_SANITIZE_ADDRESS_ATOMICS
+#endif
+
+NO_SANITIZE_ADDRESS_ATOMICS ALWAYS_INLINE void asanUnsafeReleaseStore(volatile unsigned* ptr, unsigned value)
{
MEMORY_BARRIER();
*ptr = value;
}
-__attribute__((no_sanitize_address)) ALWAYS_INLINE unsigned asanUnsafeAcquireLoad(volatile const unsigned* ptr)
+NO_SANITIZE_ADDRESS_ATOMICS ALWAYS_INLINE unsigned asanUnsafeAcquireLoad(volatile const unsigned* ptr)
{
unsigned value = *ptr;
MEMORY_BARRIER();
return value;
}
+#undef NO_SANITIZE_ADDRESS_ATOMICS
+
#endif // defined(ADDRESS_SANITIZER)
#undef MEMORY_BARRIER
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698