diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2015-08-24 22:21:44 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-08-24 22:21:44 +0000 |
commit | b92aa0fc3f6917cef9cdeac6c969283b1cc082e0 (patch) | |
tree | e535947c4108c50b8dd2d6d827570e113ab4f1ec /compiler-rt/lib/dfsan | |
parent | 01c8f5f354d556e837c404772f1be5a45e368ced (diff) | |
download | bcm5719-llvm-b92aa0fc3f6917cef9cdeac6c969283b1cc082e0.tar.gz bcm5719-llvm-b92aa0fc3f6917cef9cdeac6c969283b1cc082e0.zip |
[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).
llvm-svn: 245889
Diffstat (limited to 'compiler-rt/lib/dfsan')
-rw-r--r-- | compiler-rt/lib/dfsan/dfsan.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/dfsan/dfsan.cc b/compiler-rt/lib/dfsan/dfsan.cc index 3b1e6c43109..8cd65f79981 100644 --- a/compiler-rt/lib/dfsan/dfsan.cc +++ b/compiler-rt/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>"; } |