mirror of
https://github.com/facebook/zstd.git
synced 2024-12-12 08:56:44 +08:00
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:
parent
1e0c5466c5
commit
70d8c2a031
@ -20,6 +20,14 @@
|
||||
# define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */
|
||||
#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) \
|
||||
&& ((defined(__linux__) && defined(__GLIBC__)) \
|
||||
|| (defined(__APPLE__) && defined(__MACH__)) )
|
||||
|
Loading…
Reference in New Issue
Block a user