Index: Source/platform/heap/AddressSanitizer.h |
diff --git a/Source/platform/heap/AddressSanitizer.h b/Source/platform/heap/AddressSanitizer.h |
index 6f63ec7c2b416b553f38fedcba9b115cdb4a71b4..0ec6a35dba0d3da1d6beda586d7ba279f22fc54e 100644 |
--- a/Source/platform/heap/AddressSanitizer.h |
+++ b/Source/platform/heap/AddressSanitizer.h |
@@ -34,12 +34,20 @@ |
// FIXME: Add SyZyASan support? |
#if defined(ADDRESS_SANITIZER) |
#include <sanitizer/asan_interface.h> |
-#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) |
#else |
#define ASAN_POISON_MEMORY_REGION(addr, size) \ |
((void)(addr), (void)(size)) |
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) \ |
((void)(addr), (void)(size)) |
+#endif |
+ |
+// FIXME: Have to handle (ADDRESS_SANITIZER && _WIN32) differently as it uses |
+// both Clang (which supports the __attribute__ syntax) and CL (which doesn't) |
+// as long as we use "clang-cl /fallback". This shouldn't be needed when Clang |
+// handles all the code without falling back to CL. |
+#if defined(ADDRESS_SANITIZER) && (!OS(WIN) || COMPILER(CLANG)) |
+#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) |
+#else |
#define NO_SANITIZE_ADDRESS |
#endif |