Lune

ASPLOS2021顶会

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

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 14 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Where Did My Variable Go? Poking Holes in Incomplete Debug Information 引用了 Debug information validation for optimized code
  • D-Helix: A Generic Decompiler Testing Framework Using Symbolic Differentiation 引用了 Debug information validation for optimized code
  • Plankton: Reconciling Binary Code and Debug Information 引用了 Debug information validation for optimized code
  • Plankton: Reconciling Binary Code and Debug Information 引用了 Where Did My Variable Go? Poking Holes in Incomplete Debug Information
  • Compilation Consistency Modulo Debug Information 引用了 Debug information validation for optimized code
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper14

  1. Where Did My Variable Go? Poking Holes in Incomplete Debug InformationCristian Assaiante, Daniele Cono D'Elia, Giuseppe Antonio Di Luna, Leonardo QuerzoniASPLOS 2023 · 14 次引用
  2. D-Helix: A Generic Decompiler Testing Framework Using Symbolic DifferentiationMuqi Zou, Arslan Khan, Ruoyu Wu, Han Gao 等USENIX Security 2024 · 14 次引用
  3. Compilation Consistency Modulo Debug InformationTheodore Luo Wang, Yongqiang Tian, Yiwen Dong, Zhenyang Xu 等ASPLOS 2023 · 14 次引用
  4. Plankton: Reconciling Binary Code and Debug InformationAnshunkang Zhou, Chengfeng Ye, Heqing Huang, Yuandao Cai 等ASPLOS 2024 · 11 次引用
  5. Don't Look UB: Exposing Sanitizer-Eliding Compiler OptimizationsRaphael Isemann, Cristiano Giuffrida, Herbert Bos, Erik van der Kouwe 等PLDI 2023 · 5 次引用

它引用的 Paper1

  1. Debug information validation for optimized codeYuanbo Li, Shuo Ding, Qirun Zhang, Davide ItalianoPLDI 2020 · 30 次引用

相关 Paper

  1. Debugger Toolchain Validation via Cross-Level DebuggingYibiao Yang, Maolin Sun, Jiangchang Wu, Qingyang Li 等ASPLOS 2025 · 8 次引用
  2. Debugging Debugging Information using Dynamic Call TreesJ. Ryan Stinnett, Stephen KellOOPSLA 2026
  3. DTD: Comprehensive and Scalable Testing for DebuggersHongyi Lu, Zhibo Liu, Shuai Wang, Fengwei ZhangFSE 2024 · 2 次引用
  4. Robustifying Debug Information Updates in LLVM via Control-Flow Conformance AnalysisShan Huang, Jingjing Liang, Ting Su, Qirun ZhangPLDI 2025 · 3 次引用
  5. DebCovDiff: Differential Testing of Coverage Measurement Tools on Real-World ProjectsWentao Zhang, Jinghao Jia, Erkai Yu, Darko Marinov 等ASE 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖