Scaling up Size and Number of Expressions in Random Testing of Arithmetic Optimization of C Compilers

Eriko Nagai, Atsushi Hashimoto, Nagisa Ishiura · 2013

This paper presents an enhanced method of testing validity of arithmetic optimization of C com- pilers using randomly generated programs. Its bug de- tection capability is improved over an existing method by 1) generating longer arithmetic expressions and 2) accommodating multiple expressions in test programs. Undefined behavior in long expressions is successfully avoided by modifying problematic subexpressions dur- ing computation of expected values for the expres- sions. An efficient method for minimizing error in- ducing test programs is also presented, which utilizes binary search. Experimental results show that a ran- dom test system based on our method has higher bug detection capability than existing methods; it has de- tected more bugs than previous method in earlier ver- sions of GCCs and has revealed new bugs in the latest versions of GCCs and LLVMs.

Read the paper · More papers on PaperTik