Randomized stress-testing of link-time optimizers
Authors:
Open Access
- 13 July 2015
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 327-337
Abstract
Link-time optimization (LTO) is an increasingly important and adopted modern optimization technology. It is currently supported by many production compilers, including GCC, LLVM, and Microsoft Visual C/C++. Despite its complexity, but because it is more recent, LTO is relatively less tested compared to the more mature, traditional optimizations. To evaluate and help improve the quality of LTO, we present the first extensive effort to stress-test the LTO components of GCC and LLVM, the two most widely-used production C compilers. In 11 months, we have discovered and reported 37 bugs (12 in GCC; 25 in LLVM). Developers have confirmed 21 of our bugs, and fixed 11 of them. Our core technique is differential testing and realized in the tool Proteus. We leverage existing compiler testing tools (Csmith and Orion) to generate single-file test programs and address two important challenges specific for LTO testing. First, to thoroughly exercise LTO, Proteus automatically transforms a single-file program into multiple compilation units and stochastically assigns each an optimization level. Second, for effective bug reporting, we develop a practical mechanism to reduce LTO bugs involving multiple files. Our results clearly demonstrate Proteus’s utility; we plan to make ours a continuous effort in validating link-time optimizers.Keywords
Funding Information
- National Science Foundation (1117603,1319187,1349528.)
This publication has 18 references indexed in Scilit:
- Compiler validation via equivalence modulo inputsACM SIGPLAN Notices, 2014
- Taming compiler fuzzers2013
- Swarm testing2012
- A Formally Verified Compiler Back-endJournal of Automated Reasoning, 2009
- Equality saturationACM SIGPLAN Notices, 2009
- Formal verification of translation validators2008
- Formal certification of a compiler back-end or2006
- Link-Time Optimization of IA64 BinariesLecture Notes in Computer Science, 2004
- Translation validation for an optimizing compiler2000
- Translation validation1998