Files
wasmtime/fuzz/fuzz_targets/instantiate-wasm-smith.rs
Alex Crichton 0642e62f16 Use wasm-smith to canonicalize NaN in differential fuzzing (#3195)
* Update wasm-smith to 0.7.0

* Canonicalize NaN with wasm-smith for differential fuzzing

This then also enables floating point executing in wasmi in addition to
the spec interpreter. With NaN canonicalization at the wasm level this
means that we should be producing deterministic results between Wasmtime
and these alternative implementations.
2021-08-17 11:42:22 -05:00

13 lines
358 B
Rust

#![no_main]
use libfuzzer_sys::fuzz_target;
use wasmtime::Strategy;
use wasmtime_fuzzing::{generators::GeneratedModule, oracles};
fuzz_target!(|module: GeneratedModule| {
let mut module = module;
module.module.ensure_termination(1000);
let wasm_bytes = module.module.to_bytes();
oracles::instantiate(&wasm_bytes, true, Strategy::Auto);
});