Lune

PLDI2025顶会

Robustifying Debug Information Updates in LLVM via Control-Flow Conformance Analysis

Shan Huang, Jingjing Liang, Ting Su, Qirun Zhang

摘要

Optimizing compilers, such as LLVM, generate debug information in machine code to aid debugging. This information is particularly important when debugging optimized code, as modern software is often compiled with optimization enabled. However, properly updating debug information to reflect code transformations during optimization is a complex task that often relies on manual effort. This complexity makes the process prone to errors, which can lead to incorrect or lost debug information. Finding and fixing potential debug information update errors is vital to maintaining the accuracy and reliability of the overall debugging process. To our knowledge, no existing techniques can rectify debug information update errors in LLVM. While black-box testing approaches can find such bugs, they can neither pinpoint the root causes nor suggest fixes.

To fill the gap, we propose the first technique to robustify debug information updates in LLVM. In particular, our robustification approach can find and fix incorrect debug location updates. Central to our approach is the observation that the debug locations in the original and optimized programs must satisfy a conformance relation. The relation ensures that LLVM optimizations do not introduce extraneous debug location information on the control-flow paths of the optimized programs. We introduce control-flow conformance analysis, a novel approach that determines the reference updates ensuring the conformance relation by observing the execution of LLVM optimization passes and analyzing the debug locations in the control-flow graphs of programs under optimization. The determined reference updates are then used to check developer-written updates in LLVM. When discrepancies arise, the reference updates serve as the update skeletons to guide the fixing.

We realized our approach as a tool named MetaLoc, which determines proper debug location updates for LLVM optimizations. More importantly, with MetaLoc, we have reported and patched 46 previously unknown update errors in LLVM. All the patches, along with 22 new regression tests, have been merged into the LLVM codebase, effectively improving the accuracy and reliability of debug information in all programs optimized by LLVM. Furthermore, our approach uncovered and led to corrections in two issues within LLVM's official documentation on debug information updates.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Who's debugging the debuggers? exposing debug information bugs in optimized binaries 引用了 Debug information validation for optimized code
  • Debugging Debugging Information using Dynamic Call Trees 引用了 Debug information validation for optimized code
  • Debugging Debugging Information using Dynamic Call Trees 引用了 Who's debugging the debuggers? exposing debug information bugs in optimized binaries
  • Debugging Debugging Information using Dynamic Call Trees 引用了 Where Did My Variable Go? Poking Holes in Incomplete Debug Information
  • Where Did My Variable Go? Poking Holes in Incomplete Debug Information 引用了 Debug information validation for optimized code
  • Where Did My Variable Go? Poking Holes in Incomplete Debug Information 引用了 Who's debugging the debuggers? exposing debug information bugs in optimized binaries
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. An Integer Overflow Endgame: Compiler and Architecture Support for Default-On Integer Overflow MitigationZheng Zhang, Qi Ling, Kian Kasad, Brendan Ryan Sweeney 等USENIX Security 2026
  2. Debugging Debugging Information using Dynamic Call TreesJ. Ryan Stinnett, Stephen KellOOPSLA 2026
  3. Spatial and Temporal Decomposition for Faster Translation ValidationBenjamin Mikek, Chathur Bommineni, Qirun Zhang, Thomas RepsOOPSLA 2026

它引用的 Paper4

  1. Who's debugging the debuggers? exposing debug information bugs in optimized binariesGiuseppe Antonio Di Luna, Davide Italiano, Luca Massarelli, Sebastian Österlund 等ASPLOS 2021 · 32 次引用
  2. Debug information validation for optimized codeYuanbo Li, Shuo Ding, Qirun Zhang, Davide ItalianoPLDI 2020 · 30 次引用
  3. Where Did My Variable Go? Poking Holes in Incomplete Debug InformationCristian Assaiante, Daniele Cono D'Elia, Giuseppe Antonio Di Luna, Leonardo QuerzoniASPLOS 2023 · 14 次引用
  4. ProveNFix: Temporal Property-Guided Program RepairYahui Song, Xiang Gao, Wenhua Li, Wei-Ngan Chin 等FSE 2024 · 9 次引用

相关 Paper

  1. Optimization-Directed Compiler Fuzzing for Continuous Translation ValidationJaeseong Kwon, Bongjun Jang, Juneyoung Lee, Kihong HeoPLDI 2025 · 5 次引用
  2. IRFuzzer: Specialized Fuzzing for LLVM Backend Code GenerationYuyang Rong, Zhanghan Yu, Zhenkai Weng, Stephen Neuendorffer 等ICSE 2025 · 1 次引用
  3. An SMT Encoding of LLVM's Memory Model for Bounded Translation ValidationJuneyoung Lee, Dongjoo Kim, Chung-Kil Hur, Nuno P. LopesCAV 2021 · 10 次引用
  4. Alive2: bounded translation validation for LLVMNuno P. Lopes, Juneyoung Lee, Chung-Kil Hur, Zhengyang Liu 等PLDI 2021 · 109 次引用
  5. Seeking Evidence of Further Optimization: Detecting Missed Optimizations through Compiler’s Native AnalysesYi Zhang, Yu Wang, Ke Wang, Linzhang WangOOPSLA 2026
黄昏的海面,两侧是细线勾勒的悬崖