[Paper Review] A Systematic Impact Study for Fuzzer-Found Compiler Bugs
This paper presents a systematic, empirical study evaluating the real-world impact of fuzzer-found and user-reported compiler bugs in Clang/LLVM. Using 309 Debian packages and analyzing over 10 million lines of C/C++ code, it finds that nearly half of fuzzer-found miscompilation bugs affect generated binaries, though only two test suite failures occurred, with most changes having minimal or no semantic impact due to rare triggering conditions and conservative compiler optimizations.
Despite much recent interest in compiler randomized testing (fuzzing), the practical impact of fuzzer-found compiler bugs on real-world applications has barely been assessed. We present the first quantitative and qualitative study of the tangible impact of miscompilation bugs in a mature compiler. We follow a rigorous methodology where the bug impact over the compiled application is evaluated based on (1) whether the bug appears to trigger during compilation; (2) the extent to which generated assembly code changes syntactically due to triggering of the bug; and (3) how much such changes do cause regression test suite failures and could be used to manually trigger divergences during execution. The study is conducted with respect to the compilation of more than 10 million lines of C/C++ code from 309 Debian packages, using 12% of the historical and now fixed miscompilation bugs found by four state-of-the-art fuzzers in the Clang/LLVM compiler, as well as 18 bugs found by human users compiling real code or by formal verification. The results show that almost half of the fuzzer-found bugs propagate to the generated binaries for some packages, but rarely affect their syntax and cause two failures in total when running their test suites. User-reported and formal verification bugs do not exhibit a higher impact, with less frequently triggered bugs and one test failure. Our manual analysis of a selection of bugs, either fuzzer-found or not, suggests that none can easily trigger a runtime divergence on the packages considered in the analysis, and that in general they affect only corner cases.
Motivation & Objective
- To quantitatively and qualitatively assess the real-world impact of miscompilation bugs found by compiler fuzzers in a mature compiler like Clang/LLVM.
- To compare the impact of fuzzer-found bugs with that of user-reported and formally verified bugs in real-world applications.
- To evaluate whether syntactic changes in generated assembly due to bugs lead to actual execution divergence or test failures in real software packages.
- To determine whether the frequency and semantic significance of binary differences caused by bugs correlate with practical risk in production software.
- To inform compiler development priorities by assessing whether bug severity correlates with actual impact on real-world codebases.
Proposed method
- Selected 12% of historical, fixed miscompilation bugs from four state-of-the-art compiler fuzzers (e.g., Csmith, Yarpgen) and 18 non-fuzzer-found bugs from user reports and formal verification.
- Compiled over 10 million lines of C/C++ code from 309 Debian packages using the Clang/LLVM compiler with and without the buggy optimizations enabled.
- Measured impact through three criteria: (1) whether the bug triggered during compilation, (2) the syntactic extent of assembly code changes, and (3) whether changes caused test suite failures or runtime divergence.
- Conducted manual analysis on selected assembly differences to assess semantic impact, focusing on whether changes could lead to execution divergence under specific runtime conditions.
- Used conservative reasoning to estimate impact, assuming that only changes that alter program semantics are meaningful, and excluded non-functional effects like performance or security.
- Evaluated the fixing patches to understand whether they disabled potentially harmful optimizations, and used this to infer whether observed binary differences were likely to be benign or harmful.
Experimental results
Research questions
- RQ1To what extent do fuzzer-found miscompilation bugs in Clang/LLVM affect the compilation of real-world C/C++ applications?
- RQ2How does the impact of fuzzer-found bugs compare to that of user-reported or formally verified bugs in terms of binary modification and test suite failure?
- RQ3Are the syntactic changes in generated assembly code due to miscompilation bugs semantically significant, or do they typically not affect program behavior?
- RQ4Under what runtime conditions, if any, do these binary differences lead to actual execution divergence in real applications?
- RQ5How do the characteristics of the fixing patches (e.g., conservative disabling of optimizations) relate to the actual risk posed by the original bug?
Key findings
- Approximately 46% of fuzzer-found miscompilation bugs (12% of historical fixed bugs) resulted in syntactic changes to the generated binary for at least one Debian package.
- Only two test suite failures were observed across all impacted packages when compiling with the buggy compiler, indicating low practical impact despite widespread binary modification.
- Manual analysis revealed that most syntactic changes in assembly code caused by bugs had no semantic impact, often due to conservative compiler optimizations or rare runtime conditions.
- For EMI Bug #30935, which involved incorrect hoisting of division operations, the fixing patch disabled hoisting of divisions with non-constant divisors, reducing risk, but the bug's impact remained low due to infrequent triggering.
- User-reported and formally verified bugs showed lower trigger rates and only one test failure, indicating no higher real-world impact than fuzzer-found bugs.
- Despite syntactic changes in binaries, the vast majority of bugs did not lead to execution divergence because the changes were either semantically inert or required highly specific runtime conditions to manifest.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.