[asan] Restore check removed by r332033
authorWalter Lee <waltl@google.com>
Wed, 16 May 2018 23:23:56 +0000 (23:23 +0000)
committerWalter Lee <waltl@google.com>
Wed, 16 May 2018 23:23:56 +0000 (23:23 +0000)
Needed by fiber handling code, and possibly other code paths.

Differential Revision: https://reviews.llvm.org/D46981

llvm-svn: 332553

compiler-rt/lib/asan/asan_thread.h

index a3052ec..6609192 100644 (file)
@@ -117,6 +117,8 @@ class AsanThread {
       return nullptr;
     if (atomic_load(&stack_switching_, memory_order_relaxed))
       return nullptr;
+    if (!has_fake_stack())
+      return AsyncSignalSafeLazyInitFakeStack();
     return fake_stack_;
   }