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

Unified Diff: Source/platform/heap/AddressSanitizer.h

Issue 294653002: Define the NO_SANITIZE_ADDRESS macro in a 'clang-cl /fallback' friendly way (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix a duplicate macro definition Created 6 years, 7 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/platform/heap/AddressSanitizer.h
diff --git a/Source/platform/heap/AddressSanitizer.h b/Source/platform/heap/AddressSanitizer.h
index 6f63ec7c2b416b553f38fedcba9b115cdb4a71b4..372b86fc8b6621b5dda6c706cd00ef12b25db2bc 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) && (!defined(_WIN32) || defined(__clang__))
Mads Ager (chromium) 2014/05/19 11:41:56 Please use the Blink macros for this: #if defined
Timur Iskhodzhanov 2014/05/19 11:44:35 Done.
+#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
+#else
#define NO_SANITIZE_ADDRESS
#endif
« 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