forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add checking for fuzz. * Use wabt's validation instead of wasm2wat. Fixes bytecodealliance#16 Fixes bytecodealliance#34 * Check fuzz with nightly. * Install nightly toolchain * Travis Driven Development bytecodealliance#1 * Travis Driven Development bytecodealliance#2
- Loading branch information
Showing
4 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#![no_main] | ||
#[macro_use] extern crate libfuzzer_sys; | ||
extern crate wasmi; | ||
#[macro_use] | ||
extern crate libfuzzer_sys; | ||
extern crate wabt; | ||
extern crate wasmi; | ||
|
||
fuzz_target!(|data: &[u8]| { | ||
let wasmi_result = wasmi::load_from_buffer(data); | ||
|
||
// TODO: Do validation only! https://github.com/pepyakin/wasmi/issues/16 | ||
let wabt_result = wabt::wasm2wat(data); | ||
let wasmi_result = wasmi::Module::from_buffer(data); | ||
let wabt_result = | ||
wabt::Module::read_binary(data, &Default::default()).and_then(|m| m.validate()); | ||
|
||
assert_eq!(wasmi_result.is_ok(), wabt_result.is_ok()); | ||
}); |