peepmatic: Define fuzz targets for various parts of peepmatic

This commit is contained in:
Nick Fitzgerald
2020-05-01 16:17:43 -07:00
parent 1a7670f964
commit 4b16a4ad85
6 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use peepmatic_fuzzing::compile::compile;
fuzz_target!(|data: &[u8]| {
compile(data);
});

View File

@@ -0,0 +1,8 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use peepmatic_fuzzing::automata::fst_differential;
use std::collections::HashMap;
fuzz_target!(|map: HashMap<Vec<u8>, u64>| {
fst_differential(map);
});

View File

@@ -0,0 +1,8 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use peepmatic_fuzzing::interp::interp;
fuzz_target!(|data: &[u8]| {
interp(data);
});

View File

@@ -0,0 +1,8 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use peepmatic_fuzzing::parser::parse;
fuzz_target!(|data: &[u8]| {
parse(data);
});

View File

@@ -0,0 +1,7 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use peepmatic_fuzzing::automata::simple_automata;
fuzz_target!(|input_output_pairs: Vec<Vec<(u8, Vec<u8>)>>| {
simple_automata(input_output_pairs);
});