Go to file
Anna Zaks 2ce9f9447c Reapply: [asan] On OS X, log reports to syslog and os_trace
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).

I've initially tried to log to syslog during printing, which is done on Android
right now. The advantage is that if we crash during error reporting or the
produced error does not go through ScopedInErrorReport, we would still get a
(partial) message in the syslog. However, that solution is very problematic on
OS X. One issue is that the logging routine uses GCD, which may spawn a new
thread on its behalf. In many cases, the reporting logic locks threadRegistry,
which leads to deadlocks.

Reviewed at http://reviews.llvm.org/D13452

(In addition, add sanitizer_common_libcdep.cc to buildgo.sh to avoid
build failures on Linux.)

llvm-svn: 253688
2015-11-20 18:41:44 +00:00
clang Add -disable-llvm-passes for frontend debug info tests. 2015-11-20 18:29:01 +00:00
clang-tools-extra Test to ensure the function does not have an unresolved or unevaluated exception specification before testing whether the function throws or not. Fixes PR25574. 2015-11-19 20:45:35 +00:00
compiler-rt Reapply: [asan] On OS X, log reports to syslog and os_trace 2015-11-20 18:41:44 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc integer: remove explicit casts from _MIN definitions 2015-10-06 19:12:12 +00:00
libcxx Fix some mistakes in the <utility> and <tuple> synopses. No functional change. Thannks to K-ballo for the patch 2015-11-19 19:45:29 +00:00
libcxxabi c++abi: use __builtin_offsetof instead of offsetof 2015-11-18 05:33:38 +00:00
libunwind Make it possible to use libunwind without heap. 2015-11-09 06:57:29 +00:00
lld [ELF/AArch64] Accept -m aarch64linux. 2015-11-20 02:48:53 +00:00
lldb Revert "FOO" 2015-11-20 18:18:21 +00:00
llgo debug: Update for debug info API change. 2015-11-05 22:04:20 +00:00
llvm Avoid duplicate entry for cortex-a7 in the TargetParser (NFC) 2015-11-20 16:46:14 +00:00
openmp Add newlines to debug TRACE messages in kmp_taskdeps.cpp 2015-11-16 22:53:38 +00:00
polly ScopInfo: Ensure unique names for parameter names coming from load instructions 2015-11-17 11:54:51 +00:00