Go to file
Anna Zaks 7920eb0b1f 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: 251577
2015-10-28 23:18:44 +00:00
clang [WinEH] Mark calls inside cleanups as noinline 2015-10-28 23:06:42 +00:00
clang-tools-extra Change test to just define NULL instead of #including stddef.h. In some 2015-10-28 14:51:09 +00:00
compiler-rt Reapply: [asan] On OS X, log reports to syslog and os_trace 2015-10-28 23:18: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 Mark two Kona papers as 'in progress' 2015-10-28 19:21:40 +00:00
libcxxabi Fix LIBCXXABI_HAS_NO_THREADS configuration. 2015-10-14 19:21:38 +00:00
libunwind Add FreeBSD _Unwind_Ptr typedef 2015-10-16 19:40:09 +00:00
lld Reapply r251536 2015-10-28 18:33:08 +00:00
lldb Change Target::EvaluateExpression to take an ExecutionContextScope * rather than a 2015-10-28 22:23:17 +00:00
llgo [llgo] irgen: always use TargetMachine's data layout 2015-09-25 06:28:14 +00:00
llvm [PowerPC] Don't return unsupported register classes for asm constraints 2015-10-28 23:03:45 +00:00
openmp Removed zeroing th.th_task_state for master thread at start of nested parallel. 2015-10-20 19:21:04 +00:00
polly RegionGenerator: Clear local maps after statement construction 2015-10-26 20:41:53 +00:00