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.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper8
- LPR: Large Language Models-Aided Program ReductionMengxiao Zhang, Yongqiang Tian, Zhenyang Xu, Yiwen Dong 等ISSTA 2024 · 被引用 13 次
- Fuzzing MLIR Compiler Infrastructure via Operation Dependency AnalysisChenyao Suo, Junjie Chen, Shuang Liu, Jiajun Jiang 等ISSTA 2024 · 被引用 12 次
- Scaling Automated Database System TestingSuyang Zhong, Manuel RiggerASPLOS 2026 · 被引用 4 次
- DESIL: Detecting Silent Bugs in MLIR Compiler InfrastructureChenyao Suo, Jianrong Wang, Yongjia Wang, Jiajun Jiang 等OOPSLA 2025 · 被引用 2 次
- Divergence-Aware Testing of Graphics Shader Compiler Back-EndsDongwei Xiao, Shuai Wang, Zhibo Liu, Yiteng Peng 等PLDI 2025 · 被引用 1 次
它引用的顶会 Paper2
- Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 被引用 140 次
- 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
- Uniformity Analysis in the WebGPU Shading LanguageJames Lee-Jones, John Wickerson, Alastair F. DonaldsonPLDI 2026 · 被引用 1 次
- SafeRace: Assessing and Addressing WebGPU Memory Safety in the Presence of Data RacesReese Levine, Ashley Lee, Neha Abbas, Kyle Little 等OOPSLA 2025 · 被引用 3 次
- MLIRSmith: Random Program Generation for Fuzzing MLIR Compiler InfrastructureHaoyu Wang, Junjie Chen, Chuyue Xie, Shuang Liu 等ASE 2023 · 被引用 16 次
- Rendered Private: Making GLSL Execution Uniform to Prevent WebGL-based Browser FingerprintingShujiang Wu, Song Li, Yinzhi Cao, Ningfei WangUSENIX Security 2019 · 被引用 27 次
- Metamorphic Shader Fusion for Testing Graphics Shader CompilersDongwei Xiao, Zhibo Liu, Shuai WangICSE 2023 · 被引用 12 次
