ADDRESS_SANITIZER macro is used for two purposes:
- conditional compilation of code when ASan is enabled;
- enabling security checks, whether ASan is enabled or not.
Created attachment 244074 [details]
Comment on attachment 244074 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=244074&action=review
> +#if defined(__has_feature)
> +#define ASAN_ENABLED __has_feature(address_sanitizer)
> +#define ASAN_ENABLED false
Maybe this should be #define ENABLE_ASAN? so #if ENABLE(ASAN) could be used?
ENABLE() macros are for things that can be enabled by defining the macro, which is why I intentionally stayed away from using this form - ASan won't appear if you pass -DENABLE_ASAN.