]> granicus.if.org Git - gc/commitdiff
Support AddressSanitizer (GCC)
authorIvan Maidanski <ivmai@mail.ru>
Tue, 21 Nov 2017 08:03:28 +0000 (11:03 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 21 Nov 2017 08:03:28 +0000 (11:03 +0300)
* include/private/gcconfig.h [!__has_feature && __SANITIZE_ADDRESS__]
(ADDRESS_SANITIZER): Define.

include/private/gcconfig.h

index 4b751461e2dde3bc3dd61b07c3ab28fdd29107d4..dd84949157cdbbdbbd9aba407f7efe04adc7c9d1 100644 (file)
 # if __has_feature(thread_sanitizer) && !defined(THREAD_SANITIZER)
 #   define THREAD_SANITIZER
 # endif
-#endif
+#else
+# ifdef __SANITIZE_ADDRESS__
+    /* GCC v4.8+ */
+#   define ADDRESS_SANITIZER
+# endif
+#endif /* !__has_feature */
 
 #if defined(SPARC)
 # define ASM_CLEAR_CODE /* Stack clearing is crucial, and we    */