Detecting Compiler Error Recovery Defects via Program Mutation Exploration
Compiler error recovery diagnostics facilitates software development as it provides the possible causes and suggestions on potential programming errors. However, due to compiler bugs, error recovery diagnostics could be erroneous, spurious, missing, or even crashing for mature production compilers like GCC and Clang. Compiler testing is one of the most widely used ways of ensuring its quality. However, existing compiler diagnostics testing approaches (e.g., DIPROM) only consider the typically syntactically valid test programs as inputs, which are unlikely to trigger compiler error recovery defects. Therefore, in this paper, we propose the first mutation based approach for Compiler Error Recovery diagnostics Testing, called CERTest. Specifically, CERTest first explores the mutation space for a given seed program, and leverages a series of <i>mutation configurations</i> (which are referred as a series of mutators applying for a seed) to iteratively mutate the structures of the seed, so as to generate error-sensitive program variants for triggering compiler error recovery mechanisms. To effectively construct error-sensitive structures, CERTest then applies a novel furthest-first based selection approach to select a set of representative mutation configurations to generate program variants in each iteration. With the generated program variants, CERTest finally leverages differential testing to detect error recovery defects in different compilers. The experiments on GCC and Clang demonstrate that CERTest outperforms five state-of-the-art approaches (i.e., DIPROM, <small>Ccoft</small>, <small>Clang-fuzzer</small>, AFL++, and HiCOND) by up to 13.10%<inline-formula><tex-math notation="LaTeX">$\sim$</tex-math></inline-formula>221.61% on average in the term of bug-finding capability, and CERTest detects 9 new error recovery defects, 5 of which have been confirmed or fixed by developers.
Authors
- He Jiang (ORCID: https://orcid.org/0000-0001-8674-4948)
- Jingxuan Zhang (ORCID: https://orcid.org/0000-0002-8437-6640)
- Zhiqiu Huang (ORCID: https://orcid.org/0000-0001-6843-1892)
- Yixuan Tang (ORCID: https://orcid.org/0000-0002-9618-4697)
- Xiaochen Li (ORCID: https://orcid.org/0009-0001-0781-5857)
Institutions
- Dalian University of Technology (CN)
- Nanjing University of Aeronautics and Astronautics (CN)
Publication Details
- Journal
- IEEE Transactions on Software Engineering
- Published
- 2024-12-11
- DOI
- https://doi.org/10.1109/tse.2024.3510912
- Primary Topic
- Software System Performance and Reliability
- Type
- article
- Field-Weighted Citation Impact
- 0.00