wasmer/fuzz/fuzz_targets/validate_wasm.rs

21 lines
491 B
Rust
Raw Normal View History

2019-09-02 09:08:40 +00:00
#![no_main]
2019-09-03 22:20:36 +00:00
#[macro_use]
extern crate libfuzzer_sys;
2019-09-02 09:08:40 +00:00
extern crate wasmer;
2019-09-03 22:20:36 +00:00
extern crate wasmer_runtime_core;
2019-09-02 09:08:40 +00:00
2019-09-03 22:20:36 +00:00
use wasmer_runtime_core::backend::Features;
2019-09-02 09:08:40 +00:00
fuzz_target!(|data: &[u8]| {
2019-09-03 22:20:36 +00:00
let _ = wasmer::utils::is_wasm_binary(data);
let _ = wasmer_runtime_core::validate_and_report_errors_with_features(
&data,
Features {
// Modify these values to explore additional parts of wasmer.
simd: false,
threads: false,
},
);
});