summaryrefslogtreecommitdiff
path: root/compiler-rt/lib/scudo/scudo_allocator.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /compiler-rt/lib/scudo/scudo_allocator.cpp
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'compiler-rt/lib/scudo/scudo_allocator.cpp')
-rw-r--r--compiler-rt/lib/scudo/scudo_allocator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler-rt/lib/scudo/scudo_allocator.cpp b/compiler-rt/lib/scudo/scudo_allocator.cpp
index b2ebc9705930..d9023c2f7ab6 100644
--- a/compiler-rt/lib/scudo/scudo_allocator.cpp
+++ b/compiler-rt/lib/scudo/scudo_allocator.cpp
@@ -674,8 +674,12 @@ void initScudo() {
gwp_asan::options::initOptions();
gwp_asan::options::Options &Opts = gwp_asan::options::getOptions();
Opts.Backtrace = gwp_asan::options::getBacktraceFunction();
- Opts.PrintBacktrace = gwp_asan::options::getPrintBacktraceFunction();
GuardedAlloc.init(Opts);
+
+ if (Opts.InstallSignalHandlers)
+ gwp_asan::crash_handler::installSignalHandlers(
+ &GuardedAlloc, __sanitizer::Printf,
+ gwp_asan::options::getPrintBacktraceFunction(), Opts.Backtrace);
#endif // GWP_ASAN_HOOKS
}