Add a macro to deactivate address sanitizer for individual functions

Example:
--------
#include <nosanitize.h>
...
ATTRIBUTE_NO_SANITIZE_ADDRESS
void function_xxx()
...


Origin commit data
------------------
Commit: 3837ed1d89
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-14 (Thu, 14 Jan 2016)
This commit is contained in:
Michael Liebmann
2016-01-14 13:15:39 +01:00
parent b64ad0029d
commit 90816a0202

12
src/nosanitize.h Normal file
View File

@@ -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__ */