Zest: Validity Fuzzing and Parametric Generators for Effective Random Testing

11/30/2018
by   Rohan Padhye, et al.
0

Programs expecting structured inputs often consist of both a syntactic analysis stage in which raw input is parsed into an internal data structure and a semantic analysis stage which conducts checks on this data structure and executes the core logic of the program. Existing random testing methodologies, like coverage-guided fuzzing (CGF) and generator-based fuzzing, tend to produce inputs that are rejected early in one of these two stages. We propose Zest, a random testing methodology that effectively explores the semantic analysis stages of such programs. Zest combines two key innovations to achieve this. First, we introduce validity fuzzing, which biases CGF towards generating semantically valid inputs. Second, we introduce parametric generators, which convert input from a simple parameter domain, such as a sequence of numbers, into a more structured domain, such as syntactically valid XML. These generators enable parameter-level mutations to map to structural mutations in syntactically valid test inputs. We implement Zest in Java and evaluate it against AFL and QuickCheck, popular CGF and generator-based fuzzing tools, on six real-world benchmarks: Apache Maven, Ant, and BCEL, ScalaChess, the Google Closure compiler, and Mozilla Rhino. We find that Zest achieves the highest coverage of the semantic analysis stage for five of these benchmarks. Further, we find 18 new bugs across the benchmarks, including 7 bugs that are uniquely found by Zest.

READ FULL TEXT
research
09/13/2017

Liveness-Driven Random Program Generation

Randomly generated programs are popular for testing compilers and progra...
research
12/10/2021

Test-Case Generation for Finding Neural Network Bugs

As neural networks are increasingly included as core components of safet...
research
02/26/2022

BeDivFuzz: Integrating Behavioral Diversity into Generator-based Fuzzing

A popular metric to evaluate the performance of fuzzers is branch covera...
research
02/02/2023

Effective Random Test Generation for Deep Learning Compilers

Deep learning compilers help address difficulties of deploying deep lear...
research
04/06/2023

Covering All the Bases: Type-Based Verification of Test Input Generators

Test input generators are an important part of property-based testing (P...
research
08/29/2017

Active Learning of Input Grammars

Knowing the precise format of a program's input is a necessary prerequis...
research
12/21/2022

When and Why Test Generators for Deep Learning Produce Invalid Inputs: an Empirical Study

Testing Deep Learning (DL) based systems inherently requires large and r...

Please sign up or login with your details

Forgot password? Click here to reset