[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