diff --git a/src/nosanitize.h b/src/nosanitize.h new file mode 100644 index 000000000..03f1c7953 --- /dev/null +++ b/src/nosanitize.h @@ -0,0 +1,12 @@ +#ifndef __neutrino_sanitize_h__ +#define __neutrino_sanitize_h__ + +#ifndef ATTRIBUTE_NO_SANITIZE_ADDRESS +# if defined(__clang__) || defined (__GNUC__) +# define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) +# else +# define ATTRIBUTE_NO_SANITIZE_ADDRESS +# endif +#endif + +#endif /* __neutrino_sanitize_h__ */