Compilers are essential in daily development, but their bugs can introduce hidden bugs to many software projects. As compiler bugs are important, researchers have conducted various empirical studies to understand their characteristics. Most of the prior studies analyze only the bug reports and patches of compilers. From such sources, they analyze the root causes, locations, and repairs of compiler bugs. Their findings are useful for understanding compiler bugs themselves, but to the best of our knowledge, the impact of compiler bugs is rarely explored. For example, before compiler bugs are fixed, programmers would bypass such bugs, but no prior study analyzes the workarounds for compiler bugs.
To complement the prior studies, in this paper, we analyze how the bugs of two mainstream compilers, gcc and llvm, affect real development. Besides the bug reports and patches of compilers, in this study, from 632 Github projects, we collect 806 commits whose messages mention compiler bugs. From the dataset, we analyzes how compiler bugs affect real projects. Furthermore, we manually analyze 219 commits whose messages explicitly mention compiler bugs. Our results lead to eight findings that are useful for programmers, compiler developers, and researchers. For example, we find that programmers often modify programs or build files to bypass compiler bugs. When they modify build files, they often introduce technical debts, and such workaround should be removed after compiler bugs are fixed.
We collect 806 bug reports from 603 Github projects, and manually inspected 219 commits whose messages explicitly mention the urls of compiler bug reports. For details, see all_bugs.xlsx for the whole set; association.xlsx for manually inspected result of selected bugs.
We provide a list of commits and bug reports used as examples in our paper for easy access.
Project | Symptom | Workaround | Commit URL | Bugreport URL |
---|---|---|---|---|
Oblas | rejects-valid | implementing methods | d87584, 877a4b | Gcc91341 |
QUICK SILVER | diagnostic, wrong-code | others | cd821b | Gcc51628 |
DXX-Rebirth | diagnostic | refactoring | bace34 | Gcc10138 |
RIOT | diagnostic,wrong-code | suppressing warning messages | 6588db | Gcc42145 |
INET | rejects-valid | refactoring | 96b05e | Gcc85282 |
Xenia | diagnostic,optimization | modifying related programs | 10ff77 | Gcc100801 |
Apache Arrow | crash | refactoring | 482ac5 | Gcc98282 |
Freeciv21 | c++-feature,crash | refactoring | 0df9a4 | Gcc60855 |
libjxl | link-failure | others | 87fe7c | Gcc104248 |
SPARK | environment | disabling components | 6e36c7 | Gcc100340 |
Wesnoth | optimization | switching libraries | 6b52e1 | Gcc98723 |
GHC | rejects-valid | implementing methods | 642dc5 | LLVM8842 |
MuJS | wrong-code | disabling optimizations | 90a634 | Gcc103052 |
glibc | wrong-code | restricting compiler versions | 844b4d | Gcc98269 |
GO | - | - | 53528 | Gcc108534 This bug is still open and not fixed, so we did not classify it |