mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
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:
12
src/nosanitize.h
Normal file
12
src/nosanitize.h
Normal 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__ */
|
Reference in New Issue
Block a user