C++ Exceptions and Stack Unwinding
summary
Measures actual throw cost by tracing from cxa_throw through unwinder into the Itanium ABI and compares implementations: libgcc (8-entry cache), llvm-libunwind, and Facebook’s libunwind with a fast backtrace cache. Demonstrates two-phase search/cleanup unwinding, shows a GCC pre-8 issue hiding frames (7 → 16 frames when noexcept forces immediate terminate), finds dlopen/dlclose global-lock contention as the main multithread slowdown, and shows fast cached backtraces are orders of magnitude faster while signal-safety and cache sizing trade performance.
AI-written summary · about
chapters (9)
- 0:00Introduction to unwinding
- 3:14Zero-cost exceptions review
- 6:46C++ ABI functions
- 7:45Itanium ABI and personality
- 20:30Dwarf debug symbols
- 20:43Unwinding implementation
- 34:36Caching strategies
- 39:41Performance benchmarks
- 43:12Questions and answers
related talks
01h 02mExceptional C++
01h 06mUnwinding the Stack: Exploring How C++ Exceptions Work on Windows
23mAdvanced Usage of the C++23 Stacktrace Library
01h 23mC++ Exceptions
57mModern Linux C++ debugging tools - under the covers
01h 05mHow to Write a Heap Memory Profiler
01h 33mDe-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable
01h 29mModern Linux C++ Debugging Tools - Under the Covers
