[Lldb-commits] [lldb] 2f23abd - Increase the default maximum stack walk

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Sat May 28 13:13:08 PDT 2022


Author: Jason Molenda
Date: 2022-05-28T13:12:57-07:00
New Revision: 2f23abd6c692134c69b6d19f726d51e11200d8e4

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

LOG: Increase the default maximum stack walk

lldb will only backtrace a fixed number of stack frames, as a
last-ditch attempt to avoid a runaway looping backtrace.  It's
unusual that anyone ends up depending on this final safety net in
years. I picked the original number of 300000 was picked by seeing
how many stack frames I could make in a small recursive function
on Darwin systems before using the default stack space.  Checking
again today on a modern system, I can exceed this limit & lldb will
not show the original invocation of the recursing call.  Double the
old value to cover this larger maximum possible stack frame count,
as a default value.
(`target.process.thread.max-backtrace-depth`)

Added: 
    

Modified: 
    lldb/source/Target/TargetProperties.td

Removed: 
    


################################################################################
diff  --git a/lldb/source/Target/TargetProperties.td b/lldb/source/Target/TargetProperties.td
index 62d2c866bba99..1ceb9db82013d 100644
--- a/lldb/source/Target/TargetProperties.td
+++ b/lldb/source/Target/TargetProperties.td
@@ -277,6 +277,6 @@ let Definition = "thread" in {
     DefaultFalse,
     Desc<"If true, this thread will single-step and log execution.">;
   def MaxBacktraceDepth: Property<"max-backtrace-depth", "UInt64">,
-    DefaultUnsignedValue<300000>,
+    DefaultUnsignedValue<600000>,
     Desc<"Maximum number of frames to backtrace.">;
 }


        


More information about the lldb-commits mailing list