[asan] Improve stack overflow detection.

There are more cases when those manifest as an access below SP.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201664 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Introduce COMPILER_RT_INCLUDE_TESTS option

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201666 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Ensure that stack is limited before attempting to overflow it.

Very bad things happen otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201670 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Use host compiler to build unittests in standalone mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201672 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] A different way of detectinb stack overflow.

Instead of checking stack limits that are not well defined for the main thread,
we rely on siginfo::si_code and distance from SP.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201673 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Use host compiler to run lit tests in standalone mode

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201674 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] when printing a mutex, also print its address. Properly print the deadlock report.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201675 91177308-0d34-0410-b5e6-96231b3b80d8
[tsan] improve the test that checks for lock inversion with 3 locks

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201676 91177308-0d34-0410-b5e6-96231b3b80d8
Add rudimentary support for running compiler-rt lit tests with GCC

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201680 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Do all calls to __asan_report_* through PLT.

This matters when runtime is built as a shared library. Even though calling
code is itself part of the same library, these symbols are public and can
(theoretically) be interposed.

It might be better to declare hidden aliases for asan_report_* and call them
directly, but
  (a) they are (noreturn), so performance does not matter, and
  (b) it may be potentially less portable.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201764 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Changes to asm instrumentation must be done through the generator script.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201766 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] lit tests shouldn't depend on runtimes in standalone build

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