Automated testing of graphics shader compilers

被引:81
作者
Donaldson A.F. [1 ]
Evrard H. [1 ]
Lascu A. [1 ]
Thomson P. [1 ]
机构
[1] Department of Computing, Imperial College London, London
来源
Proceedings of the ACM on Programming Languages | 2017年 / 1卷 / OOPSLA期
关键词
Compilers; GLSL; GPUs; OpenGL; Shaders; Testing;
D O I
10.1145/3133917
中图分类号
学科分类号
摘要
We present an automated technique for finding defects in compilers for graphics shading languages. A key challenge in compiler testing is the lack of an oracle that classifies an output as correct or incorrect; this is particularly pertinent in graphics shader compilers where the output is a rendered image that is typically underspecified. Our method builds on recent successful techniques for compiler validation based on metamorphic testing, and leverages existing high-value graphics shaders to create sets of transformed shaders that should be semantically equivalent. Rendering mismatches are then indicative of shader compilation bugs. Deviant shaders are automatically minimized to identify, in each case, a minimal change to an original high-value shader that induces a shader compiler bug. We have implemented the approach as a tool, GLFuzz, targeting the OpenGL shading language, GLSL. Our experiments over a set of 17 GPU and driver configurations, spanning the main 7 GPU designers, have led to us finding and reporting more than 60 distinct bugs, covering all tested configurations. As well as defective rendering, these issues identify security-critical vulnerabilities that affect WebGL, including a significant remote information leak security bug where a malicious web page can capture the contents of other browser tabs, and a bug whereby visiting a malicious web page can lead to a lblue screen of deathž under Windows 10. Our findings show that shader compiler defects are prevalent, and that metamorphic testing provides an effective means for detecting them automatically. © 2017 Copyright held by the owner/author(s).
引用
收藏
相关论文
共 50 条
  • [1] Metamorphic Testing for (Graphics) Compilers
    Donaldson, Alastair F.
    Lascu, Andrei
    2016 IEEE/ACM 1ST INTERNATIONAL WORKSHOP ON METAMORPHIC TESTING (MET), 2016, : 44 - 47
  • [2] White Paper - Next Generation Graphics GPU Shader and Compute Libraries
    Pickles, Robert
    2020 AIAA/IEEE 39TH DIGITAL AVIONICS SYSTEMS CONFERENCE (DASC) PROCEEDINGS, 2020,
  • [3] Teaching a Shader-Based Introduction to Computer Graphics
    Angel, Ed
    Shreiner, Dave
    IEEE COMPUTER GRAPHICS AND APPLICATIONS, 2011, 31 (02) : 9 - 13
  • [4] NOTICE: A Framework for Non-functional Testing of Compilers
    Boussaa, Mohamed
    Barais, Olivier
    Baudry, Benoit
    Sunye, Gerson
    2016 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS 2016), 2016, : 335 - 346
  • [5] STRESS-TESTING OF COMPILERS FOR MODULA-2
    PRONK, C
    SOFTWARE-PRACTICE & EXPERIENCE, 1992, 22 (10) : 885 - 897
  • [6] Metamorphic Testing of Android Graphics Drivers
    Donaldson, Alastair F.
    2019 IEEE/ACM 4TH INTERNATIONAL WORKSHOP ON METAMORPHIC TESTING (MET 2019), 2019, : 1 - 1
  • [7] Automated Testing
    David W. Brooks
    Diane E. Nolan
    Susan Gallagher
    Journal of Science Education and Technology, 2003, 12 (2) : 183 - 186
  • [8] AUTOMATED MODULE TESTING IN PROLOG
    HOFFMAN, DM
    STROOPER, P
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1991, 17 (09) : 934 - 943
  • [9] Closer to the Edge: Testing Compilers More Thoroughly by Being Less Conservative About Undefined Behaviour
    Even-Mendoza, Karine
    Cadar, Cristian
    Donaldson, Alastair F.
    2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 1219 - 1223
  • [10] Using a Computer-based Testing Facility to Improve Student Learning in a Programming Languages and Compilers Course
    Nip, Terence
    Gunter, Elsa L.
    Herman, Geoffrey L.
    Morphew, Jason W.
    West, Matthew
    SIGCSE'18: PROCEEDINGS OF THE 49TH ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION, 2018, : 568 - 573