File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393# define NO_SANITIZE_ADDRESS __attribute__ ((__no_sanitize__(" address" )))
9494# define NO_SANITIZE_THREAD __attribute__ ((__no_sanitize__(" thread" )))
9595# define ALWAYS_INLINE_NO_SANITIZE_UNDEFINED __attribute__ ((__always_inline__, __no_sanitize__(" undefined" )))
96- # define DISABLE_SANITIZER_INSTRUMENTATION __attribute__ ((disable_sanitizer_instrumentation))
9796#else // / It does not work in GCC. GCC 7 cannot recognize this attribute and GCC 8 simply ignores it.
9897# define NO_SANITIZE_UNDEFINED
9998# define NO_SANITIZE_ADDRESS
10099# define NO_SANITIZE_THREAD
101100# define ALWAYS_INLINE_NO_SANITIZE_UNDEFINED ALWAYS_INLINE
102101#endif
103102
103+ #if defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 14
104+ # define DISABLE_SANITIZER_INSTRUMENTATION __attribute__ ((disable_sanitizer_instrumentation))
105+ #else
106+ # define DISABLE_SANITIZER_INSTRUMENTATION
107+ #endif
108+
109+
104110#if !__has_include(<sanitizer/asan_interface.h>) || !defined(ADDRESS_SANITIZER)
105111# define ASAN_UNPOISON_MEMORY_REGION (a, b )
106112# define ASAN_POISON_MEMORY_REGION (a, b )
You can’t perform that action at this time.
0 commit comments