Edinburgh Research Explorer

Compiler Fuzzing through Deep Learning

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Related Edinburgh Organisations

Open Access permissions

Open

Documents

Original languageEnglish
Title of host publication27th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA)
PublisherACM
Number of pages11
StateAccepted/In press - 30 Apr 2018
Event27th ACM SIGSOFT International Symposium on Software Testing and Analysis - Amsterdam, Netherlands
Duration: 15 Jul 201821 Jul 2018
https://conf.researchr.org/home/issta-2018

Conference

Conference27th ACM SIGSOFT International Symposium on Software Testing and Analysis
Abbreviated titleISSTA 2017
CountryNetherlands
CityAmsterdam
Period15/07/1821/07/18
Internet address

Abstract

Random program generation --- fuzzing --- is an effective technique for discovering bugs in compilers but successful fuzzers require extensive development effort for every language supported by the compiler, and often leave parts of the language space untested.

We introduce DeepSmith, a novel machine learning approach to accelerating compiler validation through the inference of generative models for compiler inputs. Our approach infers a learned model of the structure of real world code based on a large corpus of open source code. Then, it uses the model to automatically generate tens of thousands of realistic programs. Finally, we apply established differential testing methodologies on them to expose bugs in compilers.

We apply our approach to the OpenCL programming language, automatically exposing bugs in OpenCL compilers with little effort on our side. In 1,000 hours of automated testing of commercial and open source compilers, we discover bugs in all of them, submitting 67 bug reports.

Our test cases are on average two orders of magnitude smaller than the state-of-the-art, require 3.03x less time to generate and evaluate, and expose bugs which the state-of-the-art cannot. Our random program generator, comprising only 500 lines of code, took 12 hours to train for OpenCL versus the state-of-the-art taking 9 man months to port from a generator for C and 50,000 lines of code.

    Research areas

  • compiler, fuzzing, deep learning, machine learning, language modelling

Event

27th ACM SIGSOFT International Symposium on Software Testing and Analysis

15/07/1821/07/18

Amsterdam, Netherlands

Event: Conference

ID: 61261221