Skip to content

Commit 3164947

Browse files
committed
Remove backtrace plugin during thread sanitizer.
1 parent 7b620c7 commit 3164947

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

source/plugins/backtrace_plugin/source/backtrace_plugin.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,27 @@
2020

2121
#include <backtrace_plugin/backtrace_plugin.h>
2222

23-
#include <backward.hpp>
23+
/* This plugin is async unsafe and produces noise when interacting with Thread Sanitizer, remove this when it is async safe */
24+
#if !defined(__THREAD_SANITIZER__)
25+
#include <backward.hpp>
2426

25-
#include <log/log.h>
27+
#include <log/log.h>
2628

2729
static backward::SignalHandling signal_handling;
30+
#endif
2831

2932
int backtrace_plugin(void *loader, void *handle)
3033
{
3134
(void)loader;
3235
(void)handle;
3336

37+
#if !defined(__THREAD_SANITIZER__)
3438
if (signal_handling.loaded() == false)
3539
{
3640
log_write("metacall", LOG_LEVEL_ERROR, "Backtrace plugin failed to load, you need unwind/libunwind for stacktracing and libbfd/libdw/libdwarf for the debug information. Install the required libraries and recompile to utilise the backtrace plugin. For more information visit https://github.com/bombela/backward-cpp");
3741
return 1;
3842
}
43+
#endif
3944

4045
return 0;
4146
}

0 commit comments

Comments
 (0)