backtrace-on-stack-overflow icon indicating copy to clipboard operation
backtrace-on-stack-overflow copied to clipboard

add truncation and exit program

Open Pistonight opened this issue 1 year ago • 1 comments

My machine hangs printing the infinite stack in infinite SIGABRT callbacks

  • Changing abort to exit to kill the program after printing the trace once
  • Set the default limit for number of frames to print to 10
  • enable_with_limit to change the limit

Testing: cargo run --example main

Pistonight avatar Jun 08 '24 22:06 Pistonight

If someone ever stumbles onto this, you can use @Pistonight's fix using cargo's git feature.

backtrace-on-stack-overflow = { git = "https://github.com/Pistonight/backtrace-on-stack-overflow", branch = "feature/limit_stack_size" }

Weakky avatar May 20 '25 12:05 Weakky