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 development and intermittent testing, Dfusor has found 23 bugs (9 in GCC and 14 in Clang), with 3 confirmed and 18 fixed.
| Original language | English |
|---|---|
| Title of host publication | ASPLOS 2023 - Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems |
| Editors | Tor M. Aamodt, Natalie Enright Jerger, Michael Swift |
| Publisher | Association for Computing Machinery |
| Pages | 146-158 |
| Number of pages | 13 |
| ISBN (Electronic) | 9781450399166 |
| DOIs | |
| Publication status | Published - 27 Jan 2023 |
| Externally published | Yes |
| Event | 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS 2023 - Vancouver, Canada Duration: 25 Mar 2023 → 29 Mar 2023 |
Publication series
| Name | International Conference on Architectural Support for Programming Languages and Operating Systems - ASPLOS |
|---|---|
| Volume | 2 |
Conference
| Conference | 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS 2023 |
|---|---|
| Country/Territory | Canada |
| City | Vancouver |
| Period | 25/03/23 → 29/03/23 |
Bibliographical note
Publisher Copyright:© 2023 ACM.
Keywords
- Compiler Testing
- Debug Information
Fingerprint
Dive into the research topics of 'Compilation Consistency Modulo Debug Information'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver