[ASan tests] Fix non-Windows breakage

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208332 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Fix coverage behavior when a PC belongs to an unknown address range.

This happens, e.g., when coverage data is collected for a module which is then
dlclose()'d. Currently this causes CovDump() to ignore all PCs that are greater
than the unrecognized PC. In other words, unloading a module causes ASan to
silently ignore any coverage data for modules loaded at higher addresses.
Instead we should just skip the unrecognized PCs.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208333 91177308-0d34-0410-b5e6-96231b3b80d8
Fixup test added in r208333

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208356 91177308-0d34-0410-b5e6-96231b3b80d8
Fixup for r208066. Properly get values of PTRACE_GETREGSET/PTRACE_SETREGSET.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208363 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Move lit config for sanitizer_common unit tests under Unit/ dir for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208373 91177308-0d34-0410-b5e6-96231b3b80d8
[Sanitizer] Add the machinery to run the same test under several sanitizers

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208378 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Use ExternalProject to build MSan-ified version of libcxx for unit tests.

This change lets MSan rely on libcxx's own build system instead of manually
compiling its sources and setting up all the necessary compile flags. It would
also simplify compiling libcxx with another sanitizers (in particular, TSan).

The tricky part is to make sure libcxx is reconfigured/rebuilt when Clang or
MSan runtime library is changed. "clobber" step used in this patch works well
for me, but it's possible it would break for other configurations - will
watch the buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208451 91177308-0d34-0410-b5e6-96231b3b80d8
InstrProf: Test the functions in the runtime

Check that the profile runtime works as expected.  This tests the
functions that are meant to be available to advanced users.

In particular, check that the `atexit()` hook can be disabled by
defining a custom `__llvm_profile_runtime` variable, that the libc
dependencies are optional, and that the various functions for writing
out files work for basic cases.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208460 91177308-0d34-0410-b5e6-96231b3b80d8
InstrProf: Pacify buildbots after r208460

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208462 91177308-0d34-0410-b5e6-96231b3b80d8
InstrProf: Remove redundant declaration

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208464 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] fix a self deadlock when printing stats; add a relevant test, cleanup that test while at it to remove linux/darwin differences. Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=306

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208525 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan tests] Use clang-cl to build tests on Windows

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208526 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] define ASAN_DYNAMIC=1 if PIC is defined

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208530 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Further fix the test from r208333.

Remove a debug print and some copypasta.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208535 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] force tls_model='initial-exec' for tsan's cur_thread_placeholder so that we don't depend on the compiler flags

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208536 91177308-0d34-0410-b5e6-96231b3b80d8
Add FreeBSD support to address sanitizer process mapping facilities

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208537 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] one more attempt to enable lsan by default (PR19521)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208545 91177308-0d34-0410-b5e6-96231b3b80d8
Define CRT_HAS_128BIT even for PPC32

r201909, which introduced CRT_HAS_128BIT, unintentionally broke self-hosting on
PPC32. We used to define CRT_HAS_128BIT only on LP64 systems, but this is not
quite right (at least for Clang-compiled code). Even though __int128 is not
supported on PPC32, SROA can (and does) still form i128 variables at the IR
level, and operations on those variables may turn into the associated runtime
calls. As a result, we still need to compile __ashlti3, __ashrti3, __lshrti3,
and perhaps others, on PPC32.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208560 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Move the "coverage" flag to common flags.

The implementation lives in sanitizer_common and will need to access that flag.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208566 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan tests] Use the proper attribute on RunStrChrTest helper functions to avoid "unused function" warnings

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