Who's debugging the debuggers? exposing debug information bugs in optimized binaries
Giuseppe Antonio Di Luna, Davide Italiano, Luca Massarelli, Sebastian Österlund, Cristiano Giuffrida, Leonardo Querzoni
Abstract
Despite the advancements in software testing, bugs still plague deployed software and result in crashes in production. When debugging issues -sometimes caused by "heisenbugs"-there is the need to interpret core dumps and reproduce the issue offline on the same binary deployed. This requires the entire toolchain (compiler, linker, debugger) to correctly generate and use debug information. Little attention has been devoted to checking that such information is correctly preserved by modern toolchains' optimization stages. This is particularly important as managing debug information in optimized production binaries is non-trivial, often leading to toolchain bugs that may hinder post-deployment debugging efforts.
In this paper, we present Debug 2 , a framework to find debug information bugs in modern toolchains. Our framework feeds random source programs to the target toolchain and surgically compares the debugging behavior of their optimized/unoptimized binary variants. Such differential analysis allows Debug 2 to check invariants at each debugging step and detect bugs from invariant violations. Our invariants are based on the (in)consistency of common debug entities, such as source lines, stack frames, and function arguments. We show that, while simple, this strategy yields powerful cross-toolchain and cross-language invariants, which can pinpoint several bugs in modern toolchains. We have used Debug 2 to find 23 bugs in the LLVM toolchain (clang/lldb), 8 bugs in the GNU toolchain (GCC/gdb), and 3 in the Rust toolchain (rustc/lldb)-with 14 bugs already fixed by the developers.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2f39389e-887a-44b5-a79e-dfd14bb114b5Cited by top-tier papers14
- Where Did My Variable Go? Poking Holes in Incomplete Debug InformationCristian Assaiante, Daniele Cono D'Elia, Giuseppe Antonio Di Luna, Leonardo QuerzoniASPLOS 2023 · 14 citations
- D-Helix: A Generic Decompiler Testing Framework Using Symbolic DifferentiationMuqi Zou, Arslan Khan, Ruoyu Wu, Han Gao et al.USENIX Security 2024 · 14 citations
- Compilation Consistency Modulo Debug InformationTheodore Luo Wang, Yongqiang Tian, Yiwen Dong, Zhenyang Xu et al.ASPLOS 2023 · 14 citations
- Plankton: Reconciling Binary Code and Debug InformationAnshunkang Zhou, Chengfeng Ye, Heqing Huang, Yuandao Cai et al.ASPLOS 2024 · 11 citations
- Don't Look UB: Exposing Sanitizer-Eliding Compiler OptimizationsRaphael Isemann, Cristiano Giuffrida, Herbert Bos, Erik van der Kouwe et al.PLDI 2023 · 5 citations
Builds on1
Related papers
- Debugger Toolchain Validation via Cross-Level DebuggingYibiao Yang, Maolin Sun, Jiangchang Wu, Qingyang Li et al.ASPLOS 2025 · 8 citations
- Debugging Debugging Information using Dynamic Call TreesJ. Ryan Stinnett, Stephen KellOOPSLA 2026
- DTD: Comprehensive and Scalable Testing for DebuggersHongyi Lu, Zhibo Liu, Shuai Wang, Fengwei ZhangFSE 2024 · 2 citations
- Robustifying Debug Information Updates in LLVM via Control-Flow Conformance AnalysisShan Huang, Jingjing Liang, Ting Su, Qirun ZhangPLDI 2025 · 3 citations
- DebCovDiff: Differential Testing of Coverage Measurement Tools on Real-World ProjectsWentao Zhang, Jinghao Jia, Erkai Yu, Darko Marinov et al.ASE 2025 · 1 citation
