fileio.c: Disable backtrace when built with address sanitizer
Covers clang and gcc's sanitizer flags. Can still be overridden through CFLAGS on commandline.
This commit is contained in:
@@ -20,6 +20,14 @@
|
|||||||
# define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */
|
# define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__has_feature) && !defined(BACKTRACE_ENABLE) /* Clang compiler */
|
||||||
|
# if (__has_feature(address_sanitizer))
|
||||||
|
# define BACKTRACE_ENABLE 0
|
||||||
|
# endif /* __has_feature(address_sanitizer) */
|
||||||
|
#elif defined(__SANITIZE_ADDRESS__) && !defined(BACKTRACE_ENABLE) /* GCC compiler */
|
||||||
|
# define BACKTRACE_ENABLE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(BACKTRACE_ENABLE) \
|
#if !defined(BACKTRACE_ENABLE) \
|
||||||
&& ((defined(__linux__) && defined(__GLIBC__)) \
|
&& ((defined(__linux__) && defined(__GLIBC__)) \
|
||||||
|| (defined(__APPLE__) && defined(__MACH__)) )
|
|| (defined(__APPLE__) && defined(__MACH__)) )
|
||||||
|
|||||||
Reference in New Issue
Block a user