wasmer/fuzz/fuzz_targets/simple_instantiate.rs
Nick Lewycky 5c0ede0b42 Initial commit of a fuzzer. Run with "cargo fuzz run simple_instantiate".
Used to discover issue #558.

We'll probably want to reconsider the default .gitignore of the artifacts and corpus directories. The fuzzer wastes a lot of time not having even a single exampel of a valid .wasm file to start with.
2019-07-13 17:57:30 -07:00

14 lines
248 B
Rust

#![no_main]
#[macro_use] extern crate libfuzzer_sys;
extern crate wasmer_runtime;
use wasmer_runtime::{
instantiate,
imports,
};
fuzz_target!(|data: &[u8]| {
let import_object = imports! {};
instantiate(data, &import_object);
});