fuzz: Add a fuzz target for table.{get,set} operations
This new fuzz target exercises sequences of `table.get`s, `table.set`s, and GCs. It already found a couple bugs: * Some leaks due to ref count cycles between stores and host-defined functions closing over those stores. * If there are no live references for a PC, Cranelift can avoid emiting an associated stack map. This was running afoul of a debug assertion.
This commit is contained in:
@@ -57,6 +57,12 @@ path = "fuzz_targets/spectests.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "table_ops"
|
||||
path = "fuzz_targets/table_ops.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "peepmatic_simple_automata"
|
||||
path = "fuzz_targets/peepmatic_simple_automata.rs"
|
||||
|
||||
9
fuzz/fuzz_targets/table_ops.rs
Executable file
9
fuzz/fuzz_targets/table_ops.rs
Executable file
@@ -0,0 +1,9 @@
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use wasmtime_fuzzing::generators::{table_ops::TableOps, Config};
|
||||
|
||||
fuzz_target!(|pair: (Config, TableOps)| {
|
||||
let (config, ops) = pair;
|
||||
wasmtime_fuzzing::oracles::table_ops(config, ops);
|
||||
});
|
||||
Reference in New Issue
Block a user