diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h index 9a0466fff..1f2ce063d 100644 --- a/newlib/libc/include/sys/cdefs.h +++ b/newlib/libc/include/sys/cdefs.h @@ -709,6 +709,13 @@ /* Function should not be analyzed. */ #define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) +/* Function or variable should not be sanitized, ie. by AddressSanitizer */ +#if __has_attribute(no_sanitize) +#define __nosanitizeaddress __attribute__((no_sanitize("address"))) +#else +#define __nosanitizeaddress +#endif + /* Guard variables and structure members by lock. */ #define __guarded_by(x) __lock_annotate(guarded_by(x)) #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x))