diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-25 15:57:17 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-25 15:57:17 +0100 |
commit | 53ee76478db9ef0ce457773b8b158fb30c381a39 (patch) | |
tree | 07598c3aaf02819e6c6f75c5effc075ce61dd204 /config.h.in | |
parent | 03a061ddc157d42d37a6c68950445c964f6d6d52 (diff) | |
download | rspamd-53ee76478db9ef0ce457773b8b158fb30c381a39.tar.gz rspamd-53ee76478db9ef0ce457773b8b158fb30c381a39.zip |
[Minor] Disable asan for specific bad parts of the code
Diffstat (limited to 'config.h.in')
-rw-r--r-- | config.h.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in index 57b887b85..f36a3a474 100644 --- a/config.h.in +++ b/config.h.in @@ -370,6 +370,28 @@ typedef off_t goffset; #endif #endif +/* Address sanitizer */ +#ifdef __clang__ +# if __has_feature(address_sanitizer) +/* emulate gcc's __SANITIZE_ADDRESS__ flag */ +# define __SANITIZE_ADDRESS__ +# define RSPAMD_NO_SANITIZE \ + __attribute__((no_sanitize("address", "hwaddress"))) +# else +# define RSPAMD_NO_SANITIZE +# endif +#elif defined(__GNUC__) +/* GCC based */ +# if __has_attribute(__no_sanitize_address__) +# define RSPAMD_NO_SANITIZE __attribute__((no_sanitize_address)) +# else +# define RSPAMD_NO_SANITIZE +# endif +#else +# define RSPAMD_NO_SANITIZE +#endif + + #ifndef BITSPERBYTE # define BITSPERBYTE (NBBY * sizeof (char)) #endif |