hanchenye-llvm-project/compiler-rt
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
..
cmake [lsan] [aarch64] Add support for AArch64 2015-10-21 13:08:06 +00:00
include [sanitizer-coverage] introduce __sanitizer_get_total_unique_caller_callee_pairs 2015-10-22 22:06:41 +00:00
lib Reapply: [asan] On OS X, log reports to syslog and os_trace 2015-10-28 23:18:44 +00:00
make [compiler-rt] Properly detect lack of available system libraries for arch in clang_darwin.mk 2015-10-05 22:24:12 +00:00
test Reapply: [asan] On OS X, log reports to syslog and os_trace 2015-10-28 23:18:44 +00:00
unittests Use the newer python syntax for exceptions 2014-12-13 02:46:56 +00:00
www Update references to new lists.llvm.org mailing lists. 2015-08-05 03:58:00 +00:00
.arcconfig Update arc config to new domain. 2014-04-07 10:22:41 +00:00
.gitignore
CMakeLists.txt [CMake] Add options to control building sanitizers and builtins. 2015-09-14 19:59:24 +00:00
CODE_OWNERS.TXT
CREDITS.TXT Add Guan-Hong Liu. 2014-06-16 08:38:19 +00:00
LICENSE.TXT Update copyright year to 2015. 2015-03-12 19:53:06 +00:00
Makefile
README.txt Moved the builtins documentation to lib/builtins/ 2014-05-28 23:09:45 +00:00

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================