[PATCH] D37609: [asan] Use more generic string in error message
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 17:51:15 PDT 2017
vitalybuka created this revision.
Herald added a subscriber: kubamracek.
Part of https://github.com/google/sanitizers/issues/637
https://reviews.llvm.org/D37609
Files:
compiler-rt/lib/asan/asan_posix.cc
Index: compiler-rt/lib/asan/asan_posix.cc
===================================================================
--- compiler-rt/lib/asan/asan_posix.cc
+++ compiler-rt/lib/asan/asan_posix.cc
@@ -37,7 +37,9 @@
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, "ASAN:DEADLYSIGNAL\n", 18);
+ internal_write(2, SanitizerToolName, internal_strlen(SanitizerToolName));
+ static const char kDeadlySignal[] = ":DEADLYSIGNAL\n";
+ internal_write(2, kDeadlySignal, sizeof(kDeadlySignal) - 1);
SignalContext sig = SignalContext::Create(siginfo, context);
if (IsStackOverflow(((siginfo_t *)siginfo)->si_code, sig))
ReportStackOverflow(sig);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37609.114297.patch
Type: text/x-patch
Size: 785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170908/583ef2a4/attachment.bin>
More information about the llvm-commits
mailing list