Finding Deep Compiler Bugs via Guided Stochastic Program Mutation

Authors: Vu Le Chengnian Sun

Venue: ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) , pp. 386-399, 2015

Year: 2015

Abstract: Compiler testing is important and challenging. Equivalence Modulo Inputs (EMI) is a recent promising approach for compiler validation. It is based on mutating the unexecuted statements of an existing program under some inputs to produce new equivalent test programs w.r.t. these inputs. Orion is a simple realization of EMI by only randomly deleting unexecuted statements. Despite its success in finding many bugs in production compilers, Orion’s effectiveness is still limited by its simple, blind mutation strategy. To more effectively realize EMI, this paper introduces a guided, advanced mutation strategy based on Bayesian optimization. Our goal is to generate diverse programs to more thoroughly exercise compilers. We achieve this with two techniques: (1) the support of both code deletions and insertions in the unexecuted regions, leading to a much larger test program space; and (2) the use of an objective function that promotes control-flow-diverse programs for guiding Markov Chain Monte Carlo (MCMC) optimization to explore the search space. Our technique helps discover deep bugs that require elaborate mutations. Our realization, Athena, targets C compilers. In 19 months, Athena has found 72 new bugs — many of which are deep and important bugs — in GCC and LLVM. Developers have confirmed all 72 bugs and fixed 68 of them.

BibTeX:

@inproceedings{vule2015fdcbvgspm,
    author = "Vu Le and Chengnian Sun",
    title = "Finding Deep Compiler Bugs via Guided Stochastic Program Mutation",
    year = "2015",
    pages = "386-399",
    booktitle = "Proceedings of ACM SIGPLAN International Conference on Object-Oriented Programming, Systems,
            Languages, and Applications (OOPSLA)
        "
}

Plain Text:

Vu Le and Chengnian Sun, "Finding Deep Compiler Bugs via Guided Stochastic Program Mutation," ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and
            Applications (OOPSLA)
        , pp. 386-399