[asan] fully re-implement the FakeStack (use-after-return) to make it faster and async-signal-safe. The implementation is not yet complete (see FIXMEs) but the existing tests pass.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190588 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] use xchg instead of CAS in FakeStack::Allocate (5% faster for this case)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190589 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Fix deadlock in stack unwinder on android/x86.

Fixes PR17116.
Patch by 林作健 (manjian2006 at gmail.com).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190590 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] hopefully make the FakeStack async-signal safe, enable the related test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190592 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190593 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] (part 2) don't lazy-init fake_stack if we only need to check that fake_stack exists (should fix 32-bit builds)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190594 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] limit the size of the fake stack with a reasonable constant. This fixes a failure when the main thread's stack is considered unlimited (very large).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190596 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Do not build asan_fake_stack_test.cc on OSX until https://code.google.com/p/address-sanitizer/issues/detail?id=222 is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190597 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] add a test for use-after-return and exceptions and fix it. Not 100% sure this is a complete fix, will keep looking for harder cases.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190603 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] a bit of performance improvement in fake stack, generalized one test, fixed android build of another test

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190606 91177308-0d34-0410-b5e6-96231b3b80d8
[dfsan] Add a few easy functions to the ABI list.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190653 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] inline PoisonShadow in FakeStack to get ~10% speedup

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190660 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] use TLS on Linux to get the FakeStack. Saves 15% performance

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190661 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] undo the previous commit since TLS hack breaks with signals... :(

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190662 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] second attempt to use TLS with fake stack. This time it looks (more) async-signal safe.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190663 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] more performance to FakeStack: a) don't used atomic exchange, instead rely on regular load and store and other signal-safe logic; b) remove allocated_from_size_class_mask_ which is not helping much anyway; Another 10% speedup

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190664 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] don't record the class_id in FakeFrame (scratching the last bits of performance)

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190666 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Temporary disable UAR unit test on Android due to https://code.google.com/p/address-sanitizer/issues/detail?id=222

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190667 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Android does not have TLS

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190669 91177308-0d34-0410-b5e6-96231b3b80d8
[msandr] Add debugging instructions to README.txt.

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