[msan] Make origin tracking fork-safe.

Chained origins make plain memory stores async-signal-unsafe.
We already disable it inside signal handlers.
This change grabs all origin-related locks before fork() and releases
them after fork() to avoid a deadlock in the child process.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217140 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix fork test on centos-6.5.

Missing <atomic> header.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217142 91177308-0d34-0410-b5e6-96231b3b80d8
Fix building sanitizer_linux_libcdep.cc on FreeBSD
Differential Revision: http://reviews.llvm.org/D5166


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217148 91177308-0d34-0410-b5e6-96231b3b80d8
Intercept _exit() for sanitizers' needs on FreeBSD
Differential Revision: http://reviews.llvm.org/D5171


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217156 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Remove the check for a double-SEGV from zero_page_pc.cc
Looks like the second crash doesn't happen on Mac.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217165 91177308-0d34-0410-b5e6-96231b3b80d8
profile: Avoid name collisions between instrumentation and runtime

The naming scheme we're using for counters in profile data shares a
prefix with some fixed names we use for the runtime, notably
__llvm_profile_data_begin and _end. Embarrassingly, this means a
function called begin() can't be instrumented.

This modifies the runtime names so as not to collide with the
instrumentation.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217166 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] trying to de-flake new_array_cookie_uaf_test.cc

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217177 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Remove the call to GetPageSizeCached from fast path of FastPoisonShadow

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217194 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] relax the assertion around array cookie load; still need to extract a reproducer where this assertion fails...

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217215 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] disable zero_page_pc.cc on Android.
Bug: https://code.google.com/p/address-sanitizer/issues/detail?id=336


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217228 91177308-0d34-0410-b5e6-96231b3b80d8