summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2018-07-06 16:50:12 +0000
committerKostya Kortchinsky <kostyak@google.com>2018-07-06 16:50:12 +0000
commit2efb847b6fd09dfdc3f3757d1d4175ae5549e822 (patch)
tree2d832b0ad9009dc7eb2c929b16ca9e5cb345126d
parente85a300a77cf66921e949a4cf595eba52c637198 (diff)
downloadbcm5719-llvm-2efb847b6fd09dfdc3f3757d1d4175ae5549e822.tar.gz
bcm5719-llvm-2efb847b6fd09dfdc3f3757d1d4175ae5549e822.zip
[scudo] Add some logs for Android
Summary: Namely, set the abort message, and allow to write the message to syslog if the option is enabled. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48902 llvm-svn: 336445
-rw-r--r--compiler-rt/lib/scudo/scudo_utils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/lib/scudo/scudo_utils.cpp b/compiler-rt/lib/scudo/scudo_utils.cpp
index 42c62603309..d5788d20ca4 100644
--- a/compiler-rt/lib/scudo/scudo_utils.cpp
+++ b/compiler-rt/lib/scudo/scudo_utils.cpp
@@ -50,6 +50,9 @@ FORMAT(1, 2) void NORETURN dieWithMessage(const char *Format, ...) {
internal_memcpy(Message, ScudoError, PrefixSize);
VSNPrintf(Message + PrefixSize, sizeof(Message) - PrefixSize, Format, Args);
va_end(Args);
+ LogMessageOnPrintf(Message);
+ if (common_flags()->abort_on_error)
+ SetAbortMessage(Message);
RawWrite(Message);
Die();
}
OpenPOWER on IntegriCloud