diff options
Diffstat (limited to 'src/mongo/util/stacktrace_posix.cpp')
-rw-r--r-- | src/mongo/util/stacktrace_posix.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp index 3ad87711037..7b888f16c80 100644 --- a/src/mongo/util/stacktrace_posix.cpp +++ b/src/mongo/util/stacktrace_posix.cpp @@ -56,6 +56,16 @@ #define MONGO_STACKTRACE_BACKEND_EXECINFO 2 #if defined(MONGO_CONFIG_USE_LIBUNWIND) + +#if !defined(__has_feature) +#define __has_feature(x) 0 +#endif + +#if __has_feature(thread_sanitizer) +// TODO: SERVER-48622 (and see also https://github.com/google/sanitizers/issues/943) +#error "Cannot currently use libunwind with -fsanitize=thread" +#endif + #define MONGO_STACKTRACE_BACKEND MONGO_STACKTRACE_BACKEND_LIBUNWIND #elif defined(MONGO_CONFIG_HAVE_EXECINFO_BACKTRACE) #define MONGO_STACKTRACE_BACKEND MONGO_STACKTRACE_BACKEND_EXECINFO |