Lune

PLDI2023顶会

Program Reconditioning: Avoiding Undefined Behaviour When Finding and Reducing Compiler Bugs

Bastien Lecoeur, Hasan Mohsin, Alastair F. Donaldson

摘要

We introduce program reconditioning, a method for allowing program generation and differential testing to be used to find miscompilation bugs, and test-case reduction to be used to simplify bug-triggering programs, even when (a) the programming language of interest features undefined behaviour (UB) and (b) no tools exist to detect and avoid this UB. We present two program generation tools based on our reconditioning idea: GLSLsmith for the OpenGL Shading Language (GLSL), a widely-used language for graphics programming, and WGSLsmith for the WebGPU Shading Language (WGSL), a new language for web-based graphics rendering. GLSL features many UBs, but unlike for languages such as C and C++ no tools exist to detect them automatically. While the WGSL language specification features very limited UB, early WGSL implementations do exhibit UB, for reasons of initial implementation simplicity, making it challenging to test them to quickly detect and eliminate unrelated miscompilation bugs. Thanks to reconditioning, we show that GLSLsmith and WGSLsmith allow differential testing and test-case reduction to be applied to compilers for GLSL and WGSL for the first time, despite the unavailability of UB detection techniques for these languages. Through a large testing campaign, we have found 24 and 33 bugs in GLSL and WGSL compilers, respectively. We present experiments showing that when reconditioning is disabled, compiler testing leads to a high rate of test programs that appear to trigger miscompilation bugs, but actually just feature UB. We also present a novel approach to managing floating-point roundoff error using reconditioning, implemented for both GLSL and WGSL.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • LPR: Large Language Models-Aided Program Reduction 引用了 Random testing for C and C++ compilers with YARPGen
  • LPR: Large Language Models-Aided Program Reduction 引用了 Test-case reduction and deduplication almost for free with transformation-based compiler testing
  • Divergence-Aware Testing of Graphics Shader Compiler Back-Ends 引用了 Random testing for C and C++ compilers with YARPGen
  • Divergence-Aware Testing of Graphics Shader Compiler Back-Ends 引用了 Test-case reduction and deduplication almost for free with transformation-based compiler testing
  • DESIL: Detecting Silent Bugs in MLIR Compiler Infrastructure 引用了 Random testing for C and C++ compilers with YARPGen
  • DESIL: Detecting Silent Bugs in MLIR Compiler Infrastructure 引用了 Fuzzing MLIR Compiler Infrastructure via Operation Dependency Analysis
  • DESIL: Detecting Silent Bugs in MLIR Compiler Infrastructure 引用了 Test-case reduction and deduplication almost for free with transformation-based compiler testing
  • Test-case reduction and deduplication almost for free with transformation-based compiler testing 引用了 Random testing for C and C++ compilers with YARPGen
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper8

  1. LPR: Large Language Models-Aided Program ReductionMengxiao Zhang, Yongqiang Tian, Zhenyang Xu, Yiwen Dong 等ISSTA 2024 · 13 次引用
  2. Fuzzing MLIR Compiler Infrastructure via Operation Dependency AnalysisChenyao Suo, Junjie Chen, Shuang Liu, Jiajun Jiang 等ISSTA 2024 · 12 次引用
  3. Scaling Automated Database System TestingSuyang Zhong, Manuel RiggerASPLOS 2026 · 4 次引用
  4. DESIL: Detecting Silent Bugs in MLIR Compiler InfrastructureChenyao Suo, Jianrong Wang, Yongjia Wang, Jiajun Jiang 等OOPSLA 2025 · 2 次引用
  5. Divergence-Aware Testing of Graphics Shader Compiler Back-EndsDongwei Xiao, Shuai Wang, Zhibo Liu, Yiteng Peng 等PLDI 2025 · 1 次引用

它引用的 Paper2

  1. Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 次引用
  2. Test-case reduction and deduplication almost for free with transformation-based compiler testingAlastair F. Donaldson, Paul Thomson, Vasyl Teliman, Stefano Milizia 等PLDI 2021 · 39 次引用

相关 Paper

  1. Uniformity Analysis in the WebGPU Shading LanguageJames Lee-Jones, John Wickerson, Alastair F. DonaldsonPLDI 2026 · 1 次引用
  2. SafeRace: Assessing and Addressing WebGPU Memory Safety in the Presence of Data RacesReese Levine, Ashley Lee, Neha Abbas, Kyle Little 等OOPSLA 2025 · 3 次引用
  3. MLIRSmith: Random Program Generation for Fuzzing MLIR Compiler InfrastructureHaoyu Wang, Junjie Chen, Chuyue Xie, Shuang Liu 等ASE 2023 · 16 次引用
  4. Taking Back Control in an Intermediate Representation for GPU ComputingVasileios Klimis, Jack Clark, Alan Baker, David Neto 等POPL 2023 · 5 次引用
  5. Rendered Private: Making GLSL Execution Uniform to Prevent WebGL-based Browser FingerprintingShujiang Wu, Song Li, Yinzhi Cao, Ningfei WangUSENIX Security 2019 · 27 次引用
黄昏的海面,两侧是细线勾勒的悬崖