[PATCH] D11981: [asan] On OS X, log reports to syslog and os_trace

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 08:43:18 PDT 2015


kubabrecka created this revision.
kubabrecka added reviewers: samsonov, glider, kcc.
kubabrecka added subscribers: llvm-commits, samsonov, glider, kcc, zaks.anna.

When ASan currently detects a bug, by default it will only print out the text of the report to stderr.  This patch changes this behavior and writes the full text of the report to syslog before we terminate the process.  It also calls `os_trace` (Activity Tracing available on OS X and iOS) with a message saying that the report is available in syslog.  This is useful, because this message will be shown in the crash log.

For this to work, the patch makes sure we store the full report into `error_message_buffer` unconditionally, and it also strips out ANSI escape sequences from the report (they are used when producing colored reports).


http://reviews.llvm.org/D11981

Files:
  lib/asan/asan_report.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11981.31945.patch
Type: text/x-patch
Size: 3860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150812/d485eac3/attachment.bin>


More information about the llvm-commits mailing list