Lune

ASE2022顶会

Enriching Compiler Testing with Real Program from Bug Report

Hao Zhong

摘要

Differential testing is widely used to detect bugs in compilers. Its basic idea is to compile test programs with different compilers, and compare their compilation results to detect bugs. In this research line, 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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Validating SMT Solvers via Skeleton Enumeration Empowered by Historical Bug-Triggering Inputs 引用了 History-Driven Test Program Synthesis for JVM Testing
  • Compiler Test-Program Generation via Memoized Configuration Search 引用了 A comprehensive study of deep learning compiler bugs
  • Compiler Test-Program Generation via Memoized Configuration Search 引用了 History-Driven Test Program Synthesis for JVM Testing
  • Compiler Test-Program Generation via Memoized Configuration Search 引用了 SLEMI: equivalence modulo input (EMI) based mutation of CPS models for finding compiler bugs in Simulink
  • Compiler Test-Program Generation via Memoized Configuration Search 引用了 Enhanced Compiler Bug Isolation via Memoized Search
  • History-Driven Test Program Synthesis for JVM Testing 引用了 A comprehensive study of deep learning compiler bugs
  • History-Driven Test Program Synthesis for JVM Testing 引用了 Enhanced Compiler Bug Isolation via Memoized Search
  • Clozemaster: Fuzzing Rust Compiler by Harnessing Llms for Infilling Masked Real Programs 引用了 Validating SMT Solvers via Skeleton Enumeration Empowered by Historical Bug-Triggering Inputs
  • Clozemaster: Fuzzing Rust Compiler by Harnessing Llms for Infilling Masked Real Programs 引用了 Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries
  • Clozemaster: Fuzzing Rust Compiler by Harnessing Llms for Infilling Masked Real Programs 引用了 SLEMI: equivalence modulo input (EMI) based mutation of CPS models for finding compiler bugs in Simulink
  • Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries 引用了 History-Driven Test Program Synthesis for JVM Testing
  • Large Language Models Can Connect the Dots: Exploring Model Optimization Bugs with Domain Knowledge-Aware Prompts 引用了 A comprehensive study of deep learning compiler bugs
  • Large Language Models Can Connect the Dots: Exploring Model Optimization Bugs with Domain Knowledge-Aware Prompts 引用了 Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper11

  1. Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning LibrariesYinlin Deng, Chunqiu Steven Xia, Chenyuan Yang, Shizhuo Dylan Zhang 等ICSE 2024 · 85 次引用
  2. Compiler Test-Program Generation via Memoized Configuration SearchJunjie Chen, Chenyao Suo, Jiajun Jiang, Peiqi Chen 等ICSE 2023 · 19 次引用
  3. Validating SMT Solvers via Skeleton Enumeration Empowered by Historical Bug-Triggering InputsMaolin Sun, Yibiao Yang, Ming Wen, Yongcong Wang 等ICSE 2023 · 9 次引用
  4. Large Language Models Can Connect the Dots: Exploring Model Optimization Bugs with Domain Knowledge-Aware PromptsHao Guan, Guangdong Bai, Yepang LiuISSTA 2024 · 8 次引用
  5. Clozemaster: Fuzzing Rust Compiler by Harnessing Llms for Infilling Masked Real ProgramsHongyan Gao, Yibiao Yang, Maolin Sun, Jiangchang Wu 等ICSE 2025 · 6 次引用

它引用的 Paper7

  1. A comprehensive study of deep learning compiler bugsQingchao Shen, Haoyang Ma, Junjie Chen, Yongqiang Tian 等FSE 2021 · 123 次引用
  2. Probabilistic Delta debuggingGuancheng Wang, Ruobing Shen, Junjie Chen, Yingfei Xiong 等FSE 2021 · 56 次引用
  3. History-Driven Test Program Synthesis for JVM TestingYingquan Zhao, Zan Wang, Junjie Chen, Mengdi Liu 等ICSE 2022 · 51 次引用
  4. Enhanced Compiler Bug Isolation via Memoized SearchJunjie Chen, Haoyang Ma, Lingming ZhangASE 2020 · 36 次引用
  5. SLEMI: equivalence modulo input (EMI) based mutation of CPS models for finding compiler bugs in SimulinkShafiul Azam Chowdhury, Sohil Lal Shrestha, Taylor T. Johnson, Christoph CsallnerICSE 2020 · 35 次引用

相关 Paper

  1. Boosting Compiler Testing by Injecting Real-World CodeShaohua Li, Theodoros Theodoridis, Zhendong SuPLDI 2024 · 24 次引用
  2. CombCT: Compiler Testing via Combinatorial TestingChuan Luo, Shaoke Cui, Jiahao Yan, Junjie Chen 等ICSE 2026
  3. Finding Unstable Code via Compiler-Driven Differential TestingShaohua Li, Zhendong SuASPLOS 2023 · 19 次引用
  4. On the Feasibility of Deduplicating Compiler Bugs with BisectionXintong Zhou, Zhenyang Xu, Yongqiang Tian, Chengnian SunISSTA 2026 · 1 次引用
  5. Test-case reduction and deduplication almost for free with transformation-based compiler testingAlastair F. Donaldson, Paul Thomson, Vasyl Teliman, Stefano Milizia 等PLDI 2021 · 39 次引用
黄昏的海面,两侧是细线勾勒的悬崖