Compilation Consistency Modulo Debug Information
Theodore Luo Wang, Yongqiang Tian, Yiwen Dong, Zhenyang Xu, Chengnian Sun
Abstract
Compilation Consistency Modulo Debug Information (CCMD) is an essential compiler property that a production compiler should support: the compiler should emit the same machine code regardless of enabling debug information. CCMD is vital to developers' experiences with debugging a production binary containing no debug information. To debug such a binary, developers need build another binary with the same compiler flags and enable debug information. Without CCMD, the machine code in the latter binary will be different, which can confuse the debugger, hide the bug, or even cause a miscompilation (as GCC once did with the Linux Kernel).
This paper is the first to introduce to the research community the validation of CCMD, a new research problem that has been overlooked for decades despite its importance. More importantly, we propose the first testing technique Dfusor to automatically validate CCMD for C compilers. At the high level, given a compilable program P as a seed, Dfusor automatically generates compilable program variants via multiple effective program transformations. Such variants can cause a compiler to emit more debug information than it would when compiling P, thus exercising more code paths in the compiler and increasing the chance to find CCMD bugs.
Our extensive evaluations of Dfusor demonstrate that Dfusor can produce variants that exhibit significant increases in the quantity and complexity of the emitted debug information, and thus has found new, real bugs in GCC and LLVM. With a sample of 100 variants derived from distinct seed programs, Dfusor introduces 214% more debug information entries and 36% more distinct debug information entries in the variants than the seeds, and improves the code coverage of GCC and Clang by up to 6.00% and 6.82%. More importantly, Dfusor has found CCMD bugs; within 10 months of
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LPR: Large Language Models-Aided Program Reduction cites Random testing for C and C++ compilers with YARPGen
- Who's debugging the debuggers? exposing debug information bugs in optimized binaries cites Debug information validation for optimized code
- WDD: Weighted Delta Debugging cites LPR: Large Language Models-Aided Program Reduction
- Unveiling Compiler Faults via Attribute-Guided Compilation Space Exploration cites Debug information validation for optimized code
- Unveiling Compiler Faults via Attribute-Guided Compilation Space Exploration cites Finding missed optimizations through the lens of dead code elimination
- Unveiling Compiler Faults via Attribute-Guided Compilation Space Exploration cites Random testing for C and C++ compilers with YARPGen
- Unveiling Compiler Faults via Attribute-Guided Compilation Space Exploration cites UBFuzz: Finding Bugs in Sanitizer Implementations
- UBFuzz: Finding Bugs in Sanitizer Implementations cites Debug information validation for optimized code
- UBFuzz: Finding Bugs in Sanitizer Implementations cites Finding missed optimizations through the lens of dead code elimination
- UBFuzz: Finding Bugs in Sanitizer Implementations cites Random testing for C and C++ compilers with YARPGen
- Towards Understanding the Bugs in Solidity Compiler cites LPR: Large Language Models-Aided Program Reduction
Cited by top-tier papers9
- LPR: Large Language Models-Aided Program ReductionMengxiao Zhang, Yongqiang Tian, Zhenyang Xu, Yiwen Dong et al.ISSTA 2024 · 13 citations
- Towards Understanding the Bugs in Solidity CompilerHaoyang Ma, Wuqi Zhang, Qingchao Shen, Yongqiang Tian et al.ISSTA 2024 · 9 citations
- UBFuzz: Finding Bugs in Sanitizer ImplementationsShaohua Li, Zhendong SuASPLOS 2024 · 8 citations
- Unveiling Compiler Faults via Attribute-Guided Compilation Space ExplorationJiangchang Wu, Yibiao Yang, Maolin Sun, Yuming ZhouUSENIX ATC 2025 · 6 citations
- WDD: Weighted Delta DebuggingXintong Zhou, Zhenyang Xu, Mengxiao Zhang, Yongqiang Tian et al.ICSE 2025 · 5 citations
Builds on4
- Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 citations
- Finding missed optimizations through the lens of dead code eliminationTheodoros Theodoridis, Manuel Rigger, Zhendong SuASPLOS 2022 · 48 citations
- Who's debugging the debuggers? exposing debug information bugs in optimized binariesGiuseppe Antonio Di Luna, Davide Italiano, Luca Massarelli, Sebastian Österlund et al.ASPLOS 2021 · 32 citations
- Debug information validation for optimized codeYuanbo Li, Shuo Ding, Qirun Zhang, Davide ItalianoPLDI 2020 · 30 citations
Related papers
- Debugger Toolchain Validation via Cross-Level DebuggingYibiao Yang, Maolin Sun, Jiangchang Wu, Qingyang Li et al.ASPLOS 2025 · 8 citations
- Heterogeneous Testing for Coverage Profilers Empowered with Debugging SupportYibiao Yang, Maolin Sun, Yang Wang, Qingyang Li et al.FSE 2023 · 3 citations
- Silent Compiler Bug De-duplication via Three-Dimensional AnalysisChen Yang, Junjie Chen, Xingyu Fan, Jiajun Jiang et al.ISSTA 2023 · 14 citations
- Finding Unstable Code via Compiler-Driven Differential TestingShaohua Li, Zhendong SuASPLOS 2023 · 19 citations
- DTD: Comprehensive and Scalable Testing for DebuggersHongyi Lu, Zhibo Liu, Shuai Wang, Fengwei ZhangFSE 2024 · 2 citations
