[compiler-rt] deb2b20 - [sanitizer] Commit a missing change in BufferedStackTrace::Unwind

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri May 14 12:41:41 PDT 2021


Author: Fangrui Song
Date: 2021-05-14T12:41:34-07:00
New Revision: deb2b2051002edd9d2169d7006dcfced7e2903b1

URL: https://github.com/llvm/llvm-project/commit/deb2b2051002edd9d2169d7006dcfced7e2903b1
DIFF: https://github.com/llvm/llvm-project/commit/deb2b2051002edd9d2169d7006dcfced7e2903b1.diff

LOG: [sanitizer] Commit a missing change in BufferedStackTrace::Unwind

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp
index a9222e001555..b1f537c0238f 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp
@@ -84,7 +84,7 @@ void BufferedStackTrace::Unwind(u32 max_depth, uptr pc, uptr bp, void *context,
       UnwindSlow(pc, max_depth);
     // If there are too few frames, the program may be built with
     // -fno-asynchronous-unwind-tables. Fall back to fast unwinder below.
-    if (size > 2)
+    if (size > 2 || size >= max_depth)
       return;
 #else
     UNREACHABLE("slow unwind requested but not available");


        


More information about the llvm-commits mailing list