2018-01-24 18:32:46 +00:00
|
|
|
#![no_main]
|
2018-02-05 14:36:53 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate libfuzzer_sys;
|
2018-01-24 18:32:46 +00:00
|
|
|
extern crate wabt;
|
2018-02-05 14:36:53 +00:00
|
|
|
extern crate wasmi;
|
2018-01-24 18:32:46 +00:00
|
|
|
|
|
|
|
fuzz_target!(|data: &[u8]| {
|
2018-02-05 14:36:53 +00:00
|
|
|
let wasmi_result = wasmi::Module::from_buffer(data);
|
|
|
|
let wabt_result =
|
|
|
|
wabt::Module::read_binary(data, &Default::default()).and_then(|m| m.validate());
|
2018-01-24 18:32:46 +00:00
|
|
|
|
|
|
|
assert_eq!(wasmi_result.is_ok(), wabt_result.is_ok());
|
|
|
|
});
|