XFAIL ptrace test on arm

The patch adds better target_triple and target_arch defaults for lit tests,
which allows us to XFAIL tests based on architecture.

Was:
  target_triple = LLVM_DEFAULT_TARGET_TRIPLE
  target_arch = HOST_ARCH

Now:
  target_triple = COMPILER_RT_TEST_TARGET_TRIPLE
                , otherwise LLVM_DEFAULT_TARGET_TRIPLE
  target_arch = first item in COMPILER_RT_TEST_TARGET_TRIPLE

Differential Revision: http://reviews.llvm.org/D3855

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209256 91177308-0d34-0410-b5e6-96231b3b80d8
Use 64-bit pointer to unwind stack for x86-64

X32 uses ILP32 data model in 64-bit hardware mode.  This patch always
uses 64-bit pointer to unwind stack for x86-64.
Patch by H.J. Lu


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209277 91177308-0d34-0410-b5e6-96231b3b80d8
Cast pointers to uptr when calling internal_syscall

For Linux/x86-64, pointers passed to internal_syscall should be casted
to uptr first.  Otherwise, they won't be properly extended to 64-bit for
x32.
Patch by H.J. Lu


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209278 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] define SANITIZER_X32 and use it in ThreadDescriptorSize; partially based on patch by H.J. Lu

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209279 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] fix linux_dirent for SANITIZER_X32; based on patch by H.J. Lu

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209281 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Fix x86 asm instrumentation to preserve flags.

This change also enables asm instrumentation in asan tests that was
accidentally disabled yearlier, and adds a sanity test for that.

Patch by Yuri Gorshenin.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209282 91177308-0d34-0410-b5e6-96231b3b80d8
[lsan] disable lsan if wordsize is not 64

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209283 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Chained origins re-design.

Generalize StackDepot and create a new specialized instance of it to
efficiently (i.e. without duplicating stack trace data) store the
origin history tree.

This reduces memory usage for chained origins roughly by an order of
magnitude.

Most importantly, this new design allows us to put two limits on
stored history data (exposed in MSAN_OPTIONS) that help avoid
exponential growth in used memory on certain workloads.

See comments in lib/msan/msan_origin.h for more details.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209284 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] Fix gotsan build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209286 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Implement MSAN_OPTIONS=print_stats=1.


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


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209290 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] add a test which ensures that we dump coverage after SEGV

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209295 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Add __sanitizer_maybe_open_cov_file().

Summary: Add a new interface function required for coverage sandboxing support.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209298 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Attempt to fix test.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209301 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Add a comment about DCL-using-static vs threads

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209414 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Don't use INTERCEPTOR_ATTRIBUTE for operator new/delete on Windows

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209416 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Use the new function interception approach to handle function wrappers too; wrap strlen() in DLLs

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209427 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Add more tests for operator new[]

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209439 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Thread more library functions from the DLL thunk to the main module

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209441 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan/Win] Make sure the list of wrappers exported by the main module and imported by the DLL thunk always matches

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