Content area
Compilers are part of the foundation upon which software systems are built, so they must be as correct as possible. Compiler fuzzing is a technique that has achieved impressive results in finding compiler bugs. This dissertation presents a novel approach to constructing generative compiler fuzzers for unsafe languages. Techniques developed in this dissertation helped me to find hundreds of bugs in GCC, LLVM, the Intel C/C++ Compiler, and other tools. My first main contribution is a novel static undefined behavior avoidance mechanism. I use it to generate tests that are compliant with the language standard, allowing me to detect miscompilation errors. My second main contribution is a novel mechanism to target compiler optimizations explicitly. It allows me to thoroughly test various scalar and loop optimizations, including those found in compilers for data-parallel languages. This technique increases the diversity of generated tests and helps me detect difficult-to-find bugs. These ideas were implemented in the YARPGen compiler fuzzer, which is used by multiple companies and research groups.