summaryrefslogtreecommitdiff
path: root/lib/asan/asan_posix.cc
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2017-09-13 04:46:37 +0000
committerVitaly Buka <vitalybuka@google.com>2017-09-13 04:46:37 +0000
commit79b583e7f43a4d411a5b32f5da5eb3c50d1c735b (patch)
treeb8bfdef16939fd48b429a125535d8f09c996e59d /lib/asan/asan_posix.cc
parent995eff5631725e6e6fceba4883d01a7151ee5962 (diff)
downloadcompiler-rt-79b583e7f43a4d411a5b32f5da5eb3c50d1c735b.tar.gz
[compiler-rt] Move *Sanitizer:DEADLYSIGNAL printing into common part
Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D37764 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_posix.cc')
-rw-r--r--lib/asan/asan_posix.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/asan/asan_posix.cc b/lib/asan/asan_posix.cc
index ee701fc02..8f788bd13 100644
--- a/lib/asan/asan_posix.cc
+++ b/lib/asan/asan_posix.cc
@@ -35,11 +35,7 @@ namespace __asan {
void AsanOnDeadlySignal(int signo, void *siginfo, void *context) {
ScopedDeadlySignal signal_scope(GetCurrentThread());
- // Write the first message using fd=2, just in case.
- // It may actually fail to write in case stderr is closed.
- internal_write(2, SanitizerToolName, internal_strlen(SanitizerToolName));
- static const char kDeadlySignal[] = ":DEADLYSIGNAL\n";
- internal_write(2, kDeadlySignal, sizeof(kDeadlySignal) - 1);
+ StartReportDeadlySignal();
SignalContext sig = SignalContext::Create(siginfo, context);
if (IsStackOverflow(((siginfo_t *)siginfo)->si_code, sig))
ReportStackOverflow(sig);