From 0c21881423fcc37eda5b2be2889d43a98587189e Mon Sep 17 00:00:00 2001 From: Kostya Kortchinsky Date: Fri, 6 Jul 2018 16:50:12 +0000 Subject: [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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336445 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/scudo/scudo_utils.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/scudo/scudo_utils.cpp b/lib/scudo/scudo_utils.cpp index 42c626033..d5788d20c 100644 --- a/lib/scudo/scudo_utils.cpp +++ b/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(); } -- cgit v1.2.3