Test-Case Reduction for C Compiler Bugs

被引:187
作者
Regehr, John [1 ]
Chen, Yang [1 ]
Cuoq, Pascal
Eide, Eric [1 ]
Ellison, Chucky [2 ]
Yang, Xuejun [1 ]
机构
[1] Univ Utah, Salt Lake City, UT 84112 USA
[2] Univ Illinois, Chicago, IL 60680 USA
关键词
compiler testing; compiler defect; automated testing; random testing; bug reporting; test-case minimization;
D O I
10.1145/2345156.2254104
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
To report a compiler bug, one must often find a small test case that triggers the bug. The existing approach to automated test-case reduction, delta debugging, works by removing substrings of the original input; the result is a concatenation of substrings that delta cannot remove. We have found this approach less than ideal for reducing C programs because it typically yields test cases that are too large or even invalid (relying on undefined behavior). To obtain small and valid test cases consistently, we designed and implemented three new, domain-specific test-case reducers. The best of these is based on a novel framework in which a generic fixpoint computation invokes modular transformations that perform reduction operations. This reducer produces outputs that are, on average, more than 25 times smaller than those produced by our other reducers or by the existing reducer that is most commonly used by compiler developers. We conclude that effective program reduction requires more than straightforward delta debugging.
引用
收藏
页码:335 / 345
页数:11
相关论文
共 18 条
[1]   A static analyzer for large safety-critical software [J].
Blanchet, B ;
Cousot, P ;
Cousot, R ;
Feret, J ;
Mauborgne, L ;
Miné, A ;
Monniaux, D ;
Rival, X .
ACM SIGPLAN NOTICES, 2003, 38 (05) :196-207
[2]   A Value Analysis for C programs [J].
Canet, Geraud ;
Cuoq, Pascal ;
Monate, Benjamin .
2009 NINTH IEEE INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION, PROCEEDINGS, 2009, :123-124
[3]  
CARON JM, 1990, SIGPLAN NOTICES, V25, P17, DOI 10.1145/74105.74106
[4]   Experience Report: OCaml for an Industrial-Strength Static Analysis Framework [J].
Cuoq, Pascal ;
Signoles, Julien ;
Baudin, Patrick ;
Bonichon, Richard ;
Canet, Geraud ;
Correnson, Loic ;
Monate, Benjamin ;
Prevosto, Virgile ;
Puccetti, Armand .
ACM SIGPLAN NOTICES, 2009, 44 (8-9) :281-286
[5]  
Cuoq Pascal, 2012, P 4 NASA FORM METH S
[6]   An Executable Formal Semantics of C with Applications [J].
Ellison, Chucky ;
Rosu, Grigore .
ACM SIGPLAN NOTICES, 2012, 47 (01) :533-544
[7]  
International Organization for Standardization, 2007, 9899TC3 ISOIEC
[8]   Denali: A practical algorithm for generating optimal code [J].
Joshi, Rajeev ;
Nelson, Greg ;
Zhou, Yunhong .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2006, 28 (06) :967-989
[9]  
Leitner Andreas, 2007, 22 IEEE ACM INT C AU, P417, DOI 10.1145/1321631.1321698
[10]  
MathWorks, 2010, POL SERV 8 1 C C PRO