[UBSan] Temporarily disable checks for stack traces in UBSan reports on Darwin
to make the tests green.
Slow stack unwinding is disabled in libsanitizer on Darwin now.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216657 91177308-0d34-0410-b5e6-96231b3b80d8
[ubsan] Follow-up for r216657: fixed the line numbers in the test.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216661 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Add the -Zl flag to avoid /DEFAULTLIB:libcmt directive in the asan_win_uar_thunk object file

This directive results in 'symbol already defined' when linking DLLs that use -MD

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216663 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Add a test case for r216663 [-Zl vs LIBCMT vs asan_win_uar_thunk]

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216665 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] disable poison_array_cookie while I am investigating a false positive on chromium (I suspect that LLVM looses nosanitizer metadata; no test yet)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216684 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] introduce __asan_load_cxx_array_cookie: check that the array cookie address is properly poisoned and return the cookie value. If not, return 0 to avoid infinite loop of DTORs (in case of use-after-free). Calls to this function will be inserted by clang (separate change)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216692 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] enable poison_array_cookie back

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216705 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: unbreak windows build

Currently it fails with:

# Testing race detector.
race_windows_amd64.syso:gotsan.cc:(.text+0x4d89): undefined reference to `__imp_SymGetModuleBase64'
race_windows_amd64.syso:gotsan.cc:(.text+0x4d90): undefined reference to `__imp_SymFunctionTableAccess64'
race_windows_amd64.syso:gotsan.cc:(.text+0x4dd8): undefined reference to `__imp_StackWalk64'
x86_64-w64-mingw32/bin/ld.exe: race_windows_amd64.syso
: bad reloc address 0x10 in section `.data'
collect2.exe: error: ld returned 1 exit status




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216875 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Small refactoring - split the slow unwinding logic into sanitizer_unwind_posix.cc
This allows the slow unwinder to be used on OSX (it's disabled for now, see
https://code.google.com/p/address-sanitizer/issues/detail?id=137 for details)


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216877 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: fix false positive related to signal handlers
Users expect synchronization between sigaction and arrival
of the signal. See the test for details.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216878 91177308-0d34-0410-b5e6-96231b3b80d8
[libsanitizer] Make sanitizer_unwind_posix.cc a libcdep source file.
Guard the source with #if SANITIZER_POSIX to fix compilation on Windows.
use it only in 


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216882 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Update asan_device_setup to support Android L Preview.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216884 91177308-0d34-0410-b5e6-96231b3b80d8
[libsanitizer] Fix the Android build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216885 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: address comments in r214912
See http://reviews.llvm.org/D4794



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216900 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: restructure signal handling to allow recursive handling
Fixes issue
https://code.google.com/p/thread-sanitizer/issues/detail?id=71



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216903 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: disable getpwent interceptors

There interceptors do not seem to be strictly necessary for tsan.
But we see cases where the interceptors consume 70% of execution time.
Memory blocks passed to fgetgrent_r are "written to" by tsan several times.
First, there is some recursion (getgrnam_r calls fgetgrent_r), and each
function "writes to" the buffer. Then, the same memory is "written to"
twice, first as buf and then as pwbufp (both of them refer to the same addresses).




git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216904 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: more precise handling of atexit callbacks
Fixes issue https://code.google.com/p/thread-sanitizer/issues/detail?id=74



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@216906 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Fix origin_history_per_stack_limit=0 behavior.

It disables the per-stack limit.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217030 91177308-0d34-0410-b5e6-96231b3b80d8
tsan: handle early signals
The second part of the fix of
https://code.google.com/p/thread-sanitizer/issues/detail?id=71



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@217031 91177308-0d34-0410-b5e6-96231b3b80d8
Fix fast stack unwind on ARM to support code generated with GCC.

http://reviews.llvm.org/D4692

Patch by Maxim Ostapenko!


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