arrow
Return

Detecting Compiler Warning Defects Via Diversity-Guided Program Mutation

delete2022-11-01
delete13
PRE
AI
Y
Yixuan Tang
H
He Jiang *
Z
Zhide Zhou
X
Xiaochen Li
Z
Zhilei Ren
W
Weiqiang Kong
DOI:10.1109/TSE.2021.3119186delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Compiler diagnostic warnings help developers identify potential programming mistakes during program compilation. However, these warnings could be erroneous due to the defects of compiler warning diagnostics. Although the existing technique (i.e., Epiphron) can automatically generate test programs for compiler warning defect detection, the effectiveness of Epiphron on defect-finding is still limited, due to the limitation for generating warning-sensitive test program structures. Therefore, in this paper, we propose a DIversity-guided PROgram Mutation approach, called DIPROM, to construct diverse warning-sensitive programs for effective compiler warning defect detection. Given a seed test program, DIPROM first removes its dead code to reduce false positive warning defects. Then, the abstract syntax tree (AST) of the test program is constructed; DIPROM iteratively mutates the structures of the AST to generate warning-sensitive program variants. To effectively construct diverse warning-sensitive structures, DIPROM applies a novel diversity-guided strategy to generate program variants in each iteration. With the generated program variants, differential testing is conducted to detect warning defects in different compilers. In the experiments, we evaluate DIPROM with two popular C compilers (i.e., GCC and Clang). Experimental results show that DIPROM significantly outperforms three state-of-the-art approaches (i.e., HiCOND, Epiphron, and Hermes) by up to 18.93%similar to 76.74% in terms of the bug-finding capability on average. Meanwhile, DIPROM is efficient, which spends less time on finding the same average number of warning defects. We at last applied DIPROM to the latest development versions of GCC and Clang. After two months' running, we reported 8 new warning defects; 5 of them have been confirmed/fixed by developers.
Keywords:
Compiler testing
differential testing
program mutation
test program generation

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.9K
Citations:
1.1W

Organization

D
Dalian University of Technology
Scholars:
6.0W
Papers: 4.4W
Citations: 5.5W
Cited Papers

Cited Papers

Compiler testing: a systematic literature analysis
err2019-03-07
err23
errOAAI
errTang, Yixuan; Ren, Zhilei; Kong, Weiqiang; Jiang, He
errShare
errSave
Azole-Resistance Development; How the Aspergillus fumigatus Lifecycle Defines the Potential for Adaptation
err2021-07-24
err0
errOAAI
errJianhua Zhang; Alfons J. M. Debets; Paul E. Verweij; Eveline Snelders
errShare
errSave
N-confused porphyrin tautomers: lessons from density functional theory
err2015-01-01
err0
PREAI
errGabriel Marchand; Hélène Roy; David Mendive-Tapia; Denis Jacquemin
errShare
errSave
Is hypoxia vulnerability in fishes a by-product of maximum metabolic rate?
err2021-06-29
err0
errOAAI
errAndrew J. Esbaugh; Kerri L. Ackerly; Angelina M. Dichiera; Benjamin Negrete
errShare
errSave
Coverage Prediction for Accelerating Compiler Testing
err2021-02-01
err23
PREAI
errChen, Junjie; Wang, Guancheng; Hao, Dan; Xiong, Yingfei; Zhang, Hongyu; Zhang, Lu; Xie, Bing
errShare
errSave
researcher View more