From 1976cba7cb87f0b901085fdaf062b38e3f7c4208 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 24 Aug 2015 22:21:44 +0000 Subject: [Sanitizers] Allow to install several internal Die callbacks. This is required to properly re-apply r245770: 1) We should be able to dump coverage in __sanitizer::Die() if coverage collection is turned on. 2) We don't want to explicitly do this in every single sanitizer that supports it. 3) We don't want to link in coverage (and therefore symbolization) bits into small sanitizers that don't support it (safestack). The solution is to make InitializeCoverage() register its own Die() callback that would call __sanitizer_cov_dump(). This callback should be executed in addition to another tool-specific die callbacks (if there are any). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@245889 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/msan/msan.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/msan/msan.cc') diff --git a/lib/msan/msan.cc b/lib/msan/msan.cc index 0ba7f32bb..1b116815f 100644 --- a/lib/msan/msan.cc +++ b/lib/msan/msan.cc @@ -375,7 +375,7 @@ void __msan_init() { msan_init_is_running = 1; SanitizerToolName = "MemorySanitizer"; - SetDieCallback(MsanDie); + AddDieCallback(MsanDie); InitTlsSize(); CacheBinaryName(); -- cgit v1.2.3