[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3551349.3556894acmotherconferencesArticle/Chapter ViewAbstractPublication PagesaseConference Proceedingsconference-collections
research-article

Enriching Compiler Testing with Real Program from Bug Report

Published: 05 January 2023 Publication History

Abstract

Researchers have proposed various approaches to generate test programs. The state-of-the-art approaches can be roughly divided into random-based and mutation-based approaches: random-based approaches generate random programs and mutation-based approaches mutate programs to generate more test programs. Both lines of approaches mainly generate random code, but it is more beneficial to use real programs, since it is easier to learn the impacts of compiler bugs and it becomes reasonable to use both valid and invalid code. However, most real programs from code repositories are ineffective to trigger compiler bugs, partially because they are compiled before they are submitted.
In this experience paper, we apply two techniques such as differential testing and code snippet extraction to the specific research domain of compiler testing. Based on our observations on the practice of testing compilers, we identify bug reports of compilers as a new source for compiler testing. To illustrate the benefits of the new source, we implement a tool, called LeRe, that extracts test programs from bug reports and uses differential testing to detect compiler bugs with extracted programs. After we enriched the test programs, we have found 156 unique bugs in the latest versions of gcc and clang. Among them, 103 bugs are confirmed as valid, and 9 bugs are already fixed. Our found bugs contain 59 accept-invalid bugs and 33 reject-valid bugs. In these bugs, compilers wrongly accept invalid programs or reject valid programs. The new source enables us detecting accept-invalid and reject-valid bugs that were usually missed by the prior approaches. The prior approaches seldom report the two types of bugs. Besides our found bugs, we also present our analysis on our invalid bug reports. The results are useful for programmers, when they are switching from one compiler to another, and can provide insights, when researchers apply differential testing to detect bugs in more types of software.

References

[1]
2020. The test suite guide of llvm. https://llvm.org/docs/TestSuiteGuide.html. (2020).
[2]
2021. Partial specialization halfway accepted after instantiation. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32505. (2021).
[3]
2021. An test case that originates from a bug report. https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/g%2B%2B.dg/template/partial8.C. (2021).
[4]
2022. The call for papers of ASE2022. https://conf.researchr.org/track/ase-2022/ase-2022-research-papers. (2022).
[5]
2022. Clang 10531. https://bugs.llvm.org/show_bug.cgi?id=10531. (2022).
[6]
2022. Clang 38235. https://bugs.llvm.org/show_bug.cgi?id=38235. (2022).
[7]
2022. Clang 38268. https://bugs.llvm.org/show_bug.cgi?id=38268. (2022).
[8]
2022. Clang 5134. https://bugs.llvm.org/show_bug.cgi?id=5134. (2022).
[9]
2022. Clang 5966. https://bugs.llvm.org/show_bug.cgi?id=5966. (2022).
[10]
2022. Clang 9989. https://bugs.llvm.org/show_bug.cgi?id=9989. (2022).
[11]
2022. GCC 31775. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775. (2022).
[12]
2022. GCC 59480. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59480. (2022).
[13]
2022. GCC 86181. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86181. (2022).
[14]
2022. GCC 86208. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86208. (2022).
[15]
2022. GCC 86385. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86385. (2022).
[16]
2022. GCC 86502. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86502. (2022).
[17]
2022. The ISO C++ standard. https://isocpp.org/std/the-standard. (2022).
[18]
2022. Languagetool. https://www.languagetool.org. (2022).
[19]
2022. OpenMandriva. https://www.openmandriva.org. (2022).
[20]
2022. PlumHall. http://www.plumhall.com/stec.html. (2022).
[21]
2022. SuperTest. http://www.ace.nl/compiler/supertest.html. (2022).
[22]
2022. The Microsoft C++ compiler. https://msdn.microsoft.com/en-us/library/ms235639.aspx. (2022).
[23]
John Anvik, Lyndon Hiew, and Gail C Murphy. 2006. Who should fix this bug?. In Proc. ICSE. 361–370.
[24]
John Anvik and Gail C Murphy. 2011. Reducing the effort of bug report triage: Recommenders for development-oriented decisions. ACM Transactions on Software Engineering and Methodology 20, 3(2011), 10.
[25]
Alberto Bacchelli, Anthony Cleve, Michele Lanza, and Andrea Mocci. 2011. Extracting structured data from natural language documents with island parsing. In Proc. ASE. 476–479.
[26]
Alberto Bacchelli, Tommaso Dal Sasso, Marco D’Ambros, and Michele Lanza. 2012. Content classification of development emails. In Proc. 34th ICSE. 375–385.
[27]
Alberto Bacchelli, Marco D’Ambros, and Michele Lanza. 2010. Extracting source code from e-mails. In Proc. 18th ICPC. 24–33.
[28]
Alberto Bacchelli, Michele Lanza, and Romain Robbes. 2010. Linking e-mails and source code artifacts. In Proc. 32nd ICSE. 375–384.
[29]
Adrian Bachmann, Christian Bird, Foyzur Rahman, Premkumar Devanbu, and Abraham Bernstein. 2010. The missing links: bugs and bug-fix commits. In Proc. ESEC/FSE. 97–106.
[30]
Earl T Barr, Mark Harman, Phil McMinn, Muzammil Shahbaz, and Shin Yoo. 2014. The oracle problem in software testing: A survey. IEEE transactions on software engineering 41, 5 (2014), 507–525.
[31]
Samuel Benton, Xia Li, Yiling Lou, and Lingming Zhang. 2021. Evaluating and Improving Unified Debugging. IEEE Transactions on Software Engineering(2021).
[32]
Nicolas Bettenburg, Sascha Just, Adrian Schröter, Cathrin Weiss, Rahul Premraj, and Thomas Zimmermann. 2008. What Makes a Good Bug Report?. In Proc. FSE. 308–318.
[33]
Nicolas Bettenburg, Rahul Premraj, Thomas Zimmermann, and Sunghun Kim. 2008. Duplicate bug reports considered harmful... really?. In Proc. ICSM. 337–345.
[34]
Nicolas Bettenburg, Rahul Premraj, Thomas Zimmermann, and Sunghun Kim. 2008. Extracting structural information from bug reports. In Proc. MSR. 27–30.
[35]
Abdulazeez S Boujarwah and Kassem Saleh. 1997. Compiler test case generation methods: a survey and assessment. Information and software technology 39, 9 (1997), 617–625.
[36]
Preetha Chatterjee, Benjamin Gause, Hunter Hedinger, and Lori Pollock. 2017. Extracting code segments and their descriptions from research articles. In Proc. MSR. 91–101.
[37]
Junjie Chen, Yanwei Bai, Dan Hao, Yingfei Xiong, Hongyu Zhang, and Bing Xie. 2017. Learning to prioritize test programs for compiler testing. In Proc. ICSE. 700–711.
[38]
Junjie Chen, Yanwei Bai, Dan Hao, Yingfei Xiong, Hongyu Zhang, Lu Zhang, and Bing Xie. 2016. Test case prioritization for compilers: A text-vector based approach. In Proc. ICST. 266–277.
[39]
Junjie Chen, Jiaqi Han, Peiyi Sun, Lingming Zhang, Dan Hao, and Lu Zhang. 2022. Compiler bug isolation via effective witness test program generation. In Proc. ESEC/FSE. 223–234.
[40]
Junjie Chen, Wenxiang Hu, Dan Hao, Yingfei Xiong, Hongyu Zhang, Lu Zhang, and Bing Xie. 2016. An empirical comparison of compiler testing techniques. In Proc. ICSE. 180–190.
[41]
Junjie Chen, Haoyang Ma, and Lingming Zhang. 2020. Enhanced Compiler Bug Isolation via Memoized Search. In Proc. ASE. to appear.
[42]
Junjie Chen, Jibesh Patra, Michael Pradel, Yingfei Xiong, Hongyu Zhang, Dan Hao, and Lu Zhang. 2020. A survey of compiler testing. Comput. Surveys 53, 1 (2020), 1–36.
[43]
Junjie Chen, Guancheng Wang, Dan Hao, Yingfei Xiong, Hongyu Zhang, and Lu Zhang. 2022. History-guided configuration diversification for compiler test-program generation. In Proc. ASE. 305–316.
[44]
Yang Chen, Alex Groce, Chaoqiang Zhang, Weng-Keen Wong, Xiaoli Fern, Eric Eide, and John Regehr. 2013. Taming compiler fuzzers. In Proc. PLDI. 197–208.
[45]
Yuting Chen and Zhendong Su. 2015. Guided differential testing of certificate validation in SSL/TLS implementations. In Proc. ESEC/FSE. 793–804.
[46]
Shauvik Roy Choudhary, Husayn Versee, and Alessandro Orso. 2010. WEBDIFF: Automated identification of cross-browser issues in web applications. In Proc. ICSM. 1–10.
[47]
Shafiul Azam Chowdhury, Sohil Lal Shrestha, Taylor T Johnson, and Christoph Csallner. 2020. SLEMI: Equivalence modulo input (EMI) based mutation of CPS models for finding compiler bugs in Simulink. In Proc. ICSE. to appear.
[48]
Barthélémy Dagenais and Martin P. Robillard. 2012. Recovering Traceability Links between an API and its Learning Resources. In Proc. 34rd ICSE. 47–57.
[49]
Brett Daniel, Danny Dig, Kely Garcia, and Darko Marinov. 2007. Automated testing of refactoring engines. In Proc. ESEC/FSE. 185–194.
[50]
Mattia Fazzini, Martin Prammer, Marcelo d’Amorim, and Alessandro Orso. 2018. Automatically translating bug reports into test cases for mobile apps. In Proc. ISSTA. 141–152.
[51]
Eibe Frank. 2000. Pruning Decision Trees and Lists. Ph.D. Dissertation. Department of Computer Science, University of Waikato.
[52]
Yoav Freund and Robert E. Schapire. 1996. Experiments with a new boosting algorithm. In Proc. ICML. San Francisco, 148–156.
[53]
Philip J Guo, Thomas Zimmermann, Nachiappan Nagappan, and Brendan Murphy. 2010. Characterizing and predicting which bugs get fixed: an empirical study of Microsoft Windows. In Proc. ICSE. 495–504.
[54]
Kenneth V. Hanford. 1970. Automatic generation of test cases. IBM Systems Journal 9, 4 (1970), 242–257.
[55]
Christian Holler, Kim Herzig, and Andreas Zeller. 2012. Fuzzing with code fragments. In Proc. USENIX. 445–458.
[56]
He Jiang, Jingxuan Zhang, Zhilei Ren, and Tao Zhang. 2017. An unsupervised approach for discovering relevant tutorial fragments for APIs. In Proc. ICSE. 38–48.
[57]
Yanyan Jiang, Haicheng Chen, Feng Qin, Chang Xu, Xiaoxing Ma, and Jian Lu. 2016. Crash consistency validation made easy. In Proc. ESEC/FSE. 133–143.
[58]
Brittany Johnson, Yoonki Song, Emerson Murphy-Hill, and Robert Bowdidge. 2013. Why don’t software developers use static analysis tools to find bugs?. In Proc. ICSE. 672–681.
[59]
Vu Le, Mehrdad Afshari, and Zhendong Su. 2014. Compiler validation via equivalence modulo inputs. In Proc. PLDI. 216–226.
[60]
Vu Le, Chengnian Sun, and Zhendong Su. 2015. Finding deep compiler bugs via guided stochastic program mutation. In Proc. OOPSLA. 386–399.
[61]
Owolabi Legunsen, Wajih Ul Hassan, Xinyue Xu, Grigore Roşu, and Darko Marinov. 2016. How good are the specs? A study of the bug-finding effectiveness of existing Java API specifications. In Proc. ASE. 602–613.
[62]
Zexuan Li and Hao Zhong. 2021. An empirical study on obsolete issue reports. In Proc. ASE. 1317–1321.
[63]
Zexuan Li and Hao Zhong. 2021. Understanding code fragments with issue reports. In Proc. ASE. 1312–1316.
[64]
Christopher Lidbury, Andrei Lascu, Nathan Chong, and Alastair F Donaldson. 2015. Many-core compiler fuzzing. In Proc. PLDI. 65–76.
[65]
Yiling Lou, Ali Ghanbari, Xia Li, Lingming Zhang, Haotian Zhang, Dan Hao, and Lu Zhang. 2020. Can automated program repair refine fault localization? a unified debugging approach. In Proc. ISSTA. 75–87.
[66]
Yiling Lou, Qihao Zhu, Jinhao Dong, Xia Li, Zeyu Sun, Dan Hao, Lu Zhang, and Lingming Zhang. 2021. Boosting coverage-based fault localization via graph-based representation learning. In Proc. ESEC/FSE. 664–676.
[67]
Lorenzo Martignoni, Roberto Paleari, Giampaolo Fresi Roglia, and Danilo Bruschi. 2010. Testing system virtual machines. In Proc. ISSTA. 171–182.
[68]
William M McKeeman. 1998. Differential testing for software. Digital Technical Journal 10, 1 (1998), 100–107.
[69]
Eriko Nagai, Hironobu Awazu, Nagisa Ishiura, and Naoya Takeda. 2012. Random testing of C compilers targeting arithmetic optimization. In Proc. SASIMI 2012. 48–53.
[70]
Anh Tuan Nguyen, Tung Thanh Nguyen, Tien N Nguyen, David Lo, and Chengnian Sun. 2012. Duplicate bug report detection with a combination of information retrieval and topic modeling. In Proc. ICSE. 70–79.
[71]
John Regehr, Yang Chen, Pascal Cuoq, Eric Eide, Chucky Ellison, and Xuejun Yang. 2012. Test-case reduction for C compiler bugs. In Proc. PLDI. 335–346.
[72]
Peter C. Rigby and Martin P. Robillard. 2013. Discovering Essential Code Elements in Informal Documentation. In Proc. 35th ICSE. 11.
[73]
RP Seaman. 1974. Testing compilers of high level programming languages. IEEE Compututer System and Technology(1974), 366–375.
[74]
Qingchao Shen, Haoyang Ma, Junjie Chen, Yongqiang Tian, Shing-Chi Cheung, and Xiang Chen. 2021. A comprehensive study of deep learning compiler bugs. In Proc. ESEC/FSE. 968–980.
[75]
Chengnian Sun, Vu Le, and Zhendong Su. 2016. Finding compiler bugs via live code mutation. In Proc. OOPSLA. 849–863.
[76]
Chengnian Sun, Vu Le, Qirun Zhang, and Zhendong Su. 2016. Toward understanding compiler bugs in GCC and LLVM. In Proc. ISSTA. 294–305.
[77]
Chengnian Sun, David Lo, Xiaoyin Wang, Jing Jiang, and Siau-Cheng Khoo. 2010. A discriminative model approach for accurate duplicate bug report retrieval. In Proc. ICSE. 45–54.
[78]
Shin Hwei Tan and Ziqiang Li. 2020. Collaborative Bug Finding for Android Apps. In Proc. ICSE. to appear.
[79]
Ferdian Thung, Pavneet Singh Kochhar, and David Lo. 2014. DupFinder: integrated tool support for duplicate bug report detection. In Proc. ASE. 871–874.
[80]
Yuan Tian, Nasir Ali, David Lo, and Ahmed E Hassan. 2016. On the unreliability of bug severity data. Empirical Software Engineering 21, 6 (2016), 2298–2323.
[81]
Yuan Tian, David Lo, Xin Xia, and Chengnian Sun. 2015. Automated prediction of bug report priority using multi-factor analysis. Empirical Software Engineering 20, 5 (2015), 1354–1383.
[82]
Guancheng Wang, Ruobing Shen, Junjie Chen, Yingfei Xiong, and Lu Zhang. 2021. Probabilistic Delta debugging. In Proc. ESEC/FSE. 881–892.
[83]
Dasarath Weeratunge, Xiangyu Zhang, and Suresh Jagannathan. 2010. Analyzing multicore dumps to facilitate concurrency bug reproduction. In Proc. APLOS. 155–166.
[84]
Rongxin Wu, Hongyu Zhang, Sunghun Kim, and Shing-Chi Cheung. 2011. Relink: recovering links between bugs and changes. In Proc. ESEC/FSE. 15–25.
[85]
Jifeng Xuan, He Jiang, Yan Hu, Zhilei Ren, Weiqin Zou, Zhongxuan Luo, and Xindong Wu. 2015. Towards Effective Bug Triage with Software Data Reduction Techniques. IEEE Transactions on Knowledge and Data Engineering 27, 1(2015), 264–280.
[86]
Aoyang Yan, Hao Zhong, Daohan Song, and Li Jia. 2022. The Symptoms, Causes, and Repairs of Workarounds in Apache Issue Trackers. In Proc. ICSE. to appear.
[87]
Rahulkrishna Yandrapally, Andrea Stocco, and Ali Mesbah. 2020. Near-duplicate detection in Web App model inference. In Proc. ICSE. 186–197.
[88]
Xuejun Yang, Yang Chen, Eric Eide, and John Regehr. 2011. Finding and understanding bugs in C compilers. In Proc. PLDI. 283–294.
[89]
Tingting Yu, Tarannum S Zaman, and Chao Wang. 2017. DESCRY: reproducing system-level concurrency failures. In Proc. ESEC/FSE. 694–704.
[90]
Fiorella Zampetti, Alexander Serebrenik, and Massimiliano Di Penta. 2020. Automatically learning patterns for self-admitted technical debt removal. In Proc. SANER. 355–366.
[91]
Qirun Zhang, Chengnian Sun, and Zhendong Su. 2017. Skeletal program enumeration for rigorous compiler testing. In Proc. PLDI. 347–361.
[92]
Yingquan Zhao, Zan Wang, Junjie Chen, Mengdi Liu, Mingyuan Wu, Yuqun Zhang, and Lingming Zhang. 2022. History-driven test program synthesis for JVM testing. In Proc. ICSE. 1133–1144.
[93]
Hao Zhong and Zhendong Su. 2013. Detecting API documentation errors. In Proc. OOPSLA. 803–816.
[94]
Hao Zhong, Suresh Thummalapenta, and Tao Xie. 2013. Exposing behavioral differences in cross-language API mapping relations. In Proc. ETAPS/FASE. 130–145.
[95]
Jian Zhou, Hongyu Zhang, and David Lo. 2012. Where should the bugs be fixed? more accurate information retrieval-based bug localization based on bug reports. In Proc. ICSE. 14–24.

Cited By

View all
  • (2024)Mobile Bug Report Reproduction via Global Search on the App UI ModelProceedings of the ACM on Software Engineering10.1145/36608241:FSE(2656-2676)Online publication date: 12-Jul-2024
  • (2024)Large Language Models Can Connect the Dots: Exploring Model Optimization Bugs with Domain Knowledge-Aware PromptsProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680383(1579-1591)Online publication date: 11-Sep-2024
  • (2024)History-driven Compiler Fuzzing via Assembling and Scheduling Bug-triggering Code Segments2024 IEEE 35th International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE62328.2024.00040(331-342)Online publication date: 28-Oct-2024
  • Show More Cited By

Index Terms

  1. Enriching Compiler Testing with Real Program from Bug Report
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Please enable JavaScript to view thecomments powered by Disqus.

      Information & Contributors

      Information

      Published In

      cover image ACM Other conferences
      ASE '22: Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering
      October 2022
      2006 pages
      ISBN:9781450394758
      DOI:10.1145/3551349
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 05 January 2023

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. bug report
      2. compiler testing
      3. real program

      Qualifiers

      • Research-article
      • Research
      • Refereed limited

      Funding Sources

      • CCF-Huawei Innovation Research Plan

      Conference

      ASE '22

      Acceptance Rates

      Overall Acceptance Rate 82 of 337 submissions, 24%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)88
      • Downloads (Last 6 weeks)7
      Reflects downloads up to 11 Jan 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)Mobile Bug Report Reproduction via Global Search on the App UI ModelProceedings of the ACM on Software Engineering10.1145/36608241:FSE(2656-2676)Online publication date: 12-Jul-2024
      • (2024)Large Language Models Can Connect the Dots: Exploring Model Optimization Bugs with Domain Knowledge-Aware PromptsProceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3680383(1579-1591)Online publication date: 11-Sep-2024
      • (2024)History-driven Compiler Fuzzing via Assembling and Scheduling Bug-triggering Code Segments2024 IEEE 35th International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE62328.2024.00040(331-342)Online publication date: 28-Oct-2024
      • (2023)Validating SMT Solvers via Skeleton Enumeration Empowered by Historical Bug-Triggering InputsProceedings of the 45th International Conference on Software Engineering10.1109/ICSE48619.2023.00018(69-81)Online publication date: 14-May-2023
      • (2023)SMT Solver Validation Empowered by Large Pre-Trained Language ModelsProceedings of the 38th IEEE/ACM International Conference on Automated Software Engineering10.1109/ASE56229.2023.00180(1288-1300)Online publication date: 11-Nov-2023
      • (2023)How do programmers fix bugs as workarounds? An empirical study on Apache projectsEmpirical Software Engineering10.1007/s10664-023-10318-728:4Online publication date: 28-Jun-2023

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format.

      HTML Format

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media