ABSTRACT
This paper proposes a method of reinforcing random program generation for automated testing of C compilers. Although program generation based on equivalence transformation is a promising method for detecting deep bugs in compilers, the range of syntax it can cover has been narrower than the production rule based methods. While the conventional method based on equivalence transformation can only generate programs with scalar variables, assign statements, if and for statements, the proposed method attempts to extend them to handle arrays, structures, unions, as well as while and switch statements and function calls. A random test system, Orange4, extended with the proposed method has detected bugs in the latest development versions of GCC-8.0.0 and LLVM/Clang-6.0 which had been missed by the existing test methods.
- Free Software Foundation. {n. d.}. Installing GCC: Testing. Retrieved July 26, 2018 from http://gcc.gnu.org/install/test.htmlGoogle Scholar
- T. Fukumoto, K. Morimoto, and N. Ishiura. 2012. Accelerating regression test of compilers by test program merging. In in Proc. the Workshop on Synthesis And System Integration of Mixed Information Technologies (SASIMI 2012). 42–47.Google Scholar
- Plum Hall. {n. d.}. The Plum Hall Validation Suite for C. Retrieved July 26, 2018 from http://www.plumhall.com/stec.htmlGoogle Scholar
- A. Hashimoto and N. Ishiura. 2016. Detecting Arithmetic Optimization Opportunities for C Compilers by Randomly Generated Equivalent Programs. In IPSJ Trans. System LSI Design Methodology, Vol. 9. 21–29.Google ScholarCross Ref
- Y. Hibino, H. Ikeo, and N. Ishiura. 2017. CF3: Test Suite for Arithmetic Optimization of C Compilers (letter). In IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences, Vol. E100-A. 1511–1512.Google Scholar
- M. Iwatsuji, A. Hashimoto, and N. Ishiura. 2016. Detecting Missed Arithmetic Optimization in C Compilers by Differential Random Testing (short paper). In in Proc. the Workshop on Synthesis And System Integration of Mixed Information Technologies (SASIMI 2016). 2–3.Google Scholar
- V. Le, C. Sun, and Z. Su. 2015. Finding Deep Compiler Bugs via Guided Stochastic Program Mutation. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2015). 386–399. Google ScholarDigital Library
- V. Le, C. Sun, and Z. Su. 2015. Randomized Stress-Testing of Link-Time optimizers. In Proceedings of the 2015 International Symposium on Software Testing and Analysis (ISSTA 2015). 327–337. Google ScholarDigital Library
- C. Lindig. 2005. Random testing of C calling conventions. In Proceedings of the sixth international symposium on Automated analysis-driven debugging (AADEBUG’05). 3–12. Google ScholarDigital Library
- Eriko Nagai, Atsushi Hashimoto, and Nagisa Ishiura. 2014. Reinforcing Random Testing of Arithmetic Optimization of C Compilers by Scaling up Size and Number of Expressions. In IPSJ Transactions on System LSI Design Methodology, Vol. 7. 91–100.Google ScholarCross Ref
- Kazuhiro Nakamura and Nagisa Ishiura. 2016. Random Testing of C Compilers Based on Test Program Generation by Equivalence Transformation. In Proceedings of Asia and Pacific Conference on Circuits and Systems (APCCAS2016). 676–679.Google ScholarCross Ref
- J. Regehr, Y. Chen, P. Cuoq, E. Eide, C. Ellison, and X. Yang. 2012. Test-Case Reduction for C Compiler Bugs. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2012). 335–346. Google ScholarDigital Library
- C. Sun, V. Le, and Z. Su. 2016. Finding compiler bugs via live code mutation. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2016). 849–863. Google ScholarDigital Library
Index Terms
- Extending equivalence transformation based program generator for random testing of C compilers
Recommendations
Random testing for C and C++ compilers with YARPGen
Compilers should not crash and they should not miscompile applications. Random testing is an effective method for finding compiler bugs that have escaped other kinds of testing. This paper presents Yet Another Random Program Generator (YARPGen), a ...
Grey-box concolic testing on binary code
ICSE '19: Proceedings of the 41st International Conference on Software EngineeringWe present grey-box concolic testing, a novel path-based test case generation method that combines the best of both white-box and grey-box fuzzing. At a high level, our technique systematically explores execution paths of a program under test as in ...
Random Testing and Evolutionary Testing for Fuzzing GraphQL APIs
The Graph Query Language (GraphQL) is a powerful language for application programming interface (API) manipulation in web services. It has been recently introduced as an alternative solution for addressing the limitations of RESTful APIs. This article ...
Comments