peepmatic: Define fuzz targets for various parts of peepmatic
This commit is contained in:
@@ -14,6 +14,7 @@ cranelift-reader = { path = "../cranelift/reader" }
|
||||
cranelift-wasm = { path = "../cranelift/wasm" }
|
||||
libfuzzer-sys = "0.3.2"
|
||||
target-lexicon = "0.10"
|
||||
peepmatic-fuzzing = { path = "../cranelift/peepmatic/crates/fuzzing" }
|
||||
wasmtime = { path = "../crates/wasmtime" }
|
||||
wasmtime-fuzzing = { path = "../crates/fuzzing" }
|
||||
|
||||
@@ -56,5 +57,35 @@ path = "fuzz_targets/spectests.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "peepmatic_simple_automata"
|
||||
path = "fuzz_targets/peepmatic_simple_automata.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "peepmatic_fst_differential"
|
||||
path = "fuzz_targets/peepmatic_fst_differential.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "peepmatic_parser"
|
||||
path = "fuzz_targets/peepmatic_parser.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "peepmatic_compile"
|
||||
path = "fuzz_targets/peepmatic_compile.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "peepmatic_interp"
|
||||
path = "fuzz_targets/peepmatic_interp.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[features]
|
||||
binaryen = ['wasmtime-fuzzing/binaryen']
|
||||
|
||||
8
fuzz/fuzz_targets/peepmatic_compile.rs
Normal file
8
fuzz/fuzz_targets/peepmatic_compile.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use peepmatic_fuzzing::compile::compile;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
compile(data);
|
||||
});
|
||||
8
fuzz/fuzz_targets/peepmatic_fst_differential.rs
Normal file
8
fuzz/fuzz_targets/peepmatic_fst_differential.rs
Normal 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);
|
||||
});
|
||||
8
fuzz/fuzz_targets/peepmatic_interp.rs
Normal file
8
fuzz/fuzz_targets/peepmatic_interp.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use peepmatic_fuzzing::interp::interp;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
interp(data);
|
||||
});
|
||||
8
fuzz/fuzz_targets/peepmatic_parser.rs
Normal file
8
fuzz/fuzz_targets/peepmatic_parser.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use peepmatic_fuzzing::parser::parse;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
parse(data);
|
||||
});
|
||||
7
fuzz/fuzz_targets/peepmatic_simple_automata.rs
Normal file
7
fuzz/fuzz_targets/peepmatic_simple_automata.rs
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user