Robustifying Debug Information Updates in LLVM via Control-Flow Conformance Analysis
This program is tentative and subject to change.
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.
This program is tentative and subject to change.
Fri 20 JunDisplayed time zone: Seoul change
10:30 - 12:10 | |||
10:30 20mTalk | Robustifying Debug Information Updates in LLVM via Control-Flow Conformance Analysis PLDI Research Papers Shan Huang East China Normal University, Jingjing Liang East China Normal University, Ting Su East China Normal University, Qirun Zhang Georgia Institute of Technology DOI | ||
10:50 20mTalk | CompCertOC: Verified Compositional Compilation of Multi-threaded Programs with Shared Stacks PLDI Research Papers Ling Zhang Shanghai Jiao Tong University, Yuting Wang Shanghai Jiao Tong University, Yalun Liang Shanghai Jiao Tong University, Zhong Shao Yale University DOI | ||
11:10 20mTalk | Link-Time Optimization of Dynamic Casts in C++ Programs PLDI Research Papers Xufan Lu INESC-ID / Instituto Superior Técnico, University of Lisbon, Nuno P. Lopes INESC-ID; Instituto Superior Técnico - University of Lisbon Link to publication DOI | ||
11:30 20mTalk | Divergence-Aware Testing of Graphics Shader Compiler Back-Ends PLDI Research Papers Dongwei Xiao Hong Kong University of Science and Technology, Shuai Wang Hong Kong University of Science and Technology, Zhibo Liu Hong Kong University of Science and Technology, Yiteng Peng Hong Kong University of Science and Technology, Daoyuan Wu Hong Kong University of Science and Technology, Zhendong Su ETH Zurich DOI | ||
11:50 20mTalk | Optimization-Directed Compiler Fuzzing for Continuous Translation Validation PLDI Research Papers DOI Pre-print |