[sanitizer] Do not fall back to SlowUnwindStack() in GetStackTrace()

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183414 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/lsan/lsan_common_linux.cc b/lib/lsan/lsan_common_linux.cc
index 10a434b..9570810 100644
--- a/lib/lsan/lsan_common_linux.cc
+++ b/lib/lsan/lsan_common_linux.cc
@@ -96,8 +96,9 @@
   uptr size = 0;
   const uptr *trace = StackDepotGet(stack_id, &size);
   // The top frame is our malloc/calloc/etc. The next frame is the caller.
-  CHECK_GE(size, 2);
-  return trace[1];
+  if (size >= 2)
+    return trace[1];
+  return 0;
 }
 
 void ProcessPlatformSpecificAllocationsCb::operator()(void *p) const {