summaryrefslogtreecommitdiff
path: root/lib/dfsan
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-08-24 22:21:44 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-08-24 22:21:44 +0000
commit1976cba7cb87f0b901085fdaf062b38e3f7c4208 (patch)
treee6af267044a16ff8a3853453f6c47948b59778fe /lib/dfsan
parent8e989c1f9e08be9153e4b8b3ecbde93f673539c8 (diff)
downloadcompiler-rt-1976cba7cb87f0b901085fdaf062b38e3f7c4208.tar.gz
[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
Diffstat (limited to 'lib/dfsan')
-rw-r--r--lib/dfsan/dfsan.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dfsan/dfsan.cc b/lib/dfsan/dfsan.cc
index 3b1e6c431..8cd65f799 100644
--- a/lib/dfsan/dfsan.cc
+++ b/lib/dfsan/dfsan.cc
@@ -416,7 +416,7 @@ static void dfsan_init(int argc, char **argv, char **envp) {
// Register the fini callback to run when the program terminates successfully
// or it is killed by the runtime.
Atexit(dfsan_fini);
- SetDieCallback(dfsan_fini);
+ AddDieCallback(dfsan_fini);
__dfsan_label_info[kInitializingLabel].desc = "<init label>";
}