[ASan Win] Simplify and improve the way we forward ASan interface calls from DLLs

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209210 91177308-0d34-0410-b5e6-96231b3b80d8
Go via uintptr_t when casting away constness, otherwise GCC will warn
when using -Wcast-qual.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209214 91177308-0d34-0410-b5e6-96231b3b80d8
Run common and profile tests in cross-compiled builds.

Route target_cflags to common and profile tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209248 91177308-0d34-0410-b5e6-96231b3b80d8
[ubsan] fix vptr test on ARM

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209249 91177308-0d34-0410-b5e6-96231b3b80d8
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