Metadata
- Source
- File: Random testing for C and C++ compilers with YARPGen by Livinskii et al (2020).pdf
- Zotero: View Item
- Type: Journal Article
- Title: Random testing for C and C++ compilers with YARPGen,
- Author: Livinskii, Vsevolod; Babokin, Dmitry; Regehr, John;
- Journal: Proceedings of the ACM on Programming Languages,
- Volume: 4,
- Issue: OOPSLA
- Pages: 1-25
- Year: 2020
- DOI: 10.1145/3428264
- ISSN: 2475-1421
Abstract
Compilers should not crash and they should not miscompile applications. Random testing is an effective method for finding compiler bugs that have escaped other kinds of testing. This paper presents Yet Another Random Program Generator (YARPGen), a random test-case generator for C and C++ that we used to find and report more than 220 bugs in GCC, LLVM, and the Intel® C++ Compiler. Our research contributions include a method for generating expressive programs that avoid undefined behavior without using dynamic checks, and generation policies, a mechanism for increasing diversity of generated code and for triggering more optimizations. Generation policies decrease the testing time to find hard-to-trigger compiler bugs and, for the kinds of scalar optimizations YARPGen was designed to stress-test, increase the number of times these optimizations are applied by the compiler by an average of 20% for LLVM and 40% for GCC. We also created tools for automating most of the common tasks related to compiler fuzzing; these tools are also useful for fuzzers other than ours.
Tags and Collections
- Keywords: 05 Finished; Compiler; Compiler Fuzzing; Differential Testing
- Collections: SemPy
Comments