diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2018-07-06 16:50:12 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2018-07-06 16:50:12 +0000 |
commit | 0c21881423fcc37eda5b2be2889d43a98587189e (patch) | |
tree | 8f4096cfc48d04c90af3b63defd5aeb956295902 /lib | |
parent | 171f1837de1002d59f22d72d4794e2b7eb9c2214 (diff) |
[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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scudo/scudo_utils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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(); } |