From: Ivan Maidanski Date: Tue, 21 Nov 2017 08:03:28 +0000 (+0300) Subject: Support AddressSanitizer (GCC) X-Git-Tag: v7.6.2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be968e7a7b2e758ad496d9a4ed457711b046826a;p=gc Support AddressSanitizer (GCC) (Cherry-pick commit e8e90817 from 'master' branch.) * include/private/gcconfig.h [!__has_feature && __SANITIZE_ADDRESS__] (ADDRESS_SANITIZER): Define. --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index ecc8dbbd..bec8a681 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -3133,7 +3133,12 @@ # if __has_feature(memory_sanitizer) && !defined(MEMORY_SANITIZER) # define MEMORY_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 */