Remove reader_parse_test/translate_module fuzz targets (#1212)

This commit removes the two fuzz targets that we imported from cranelift
when cranelift merged in. These have both uncovered a few issues in the
fuzz targets themselves, for example:

* `translate_module` - this doesn't verify the wasm is valid a head of
  time and cranelift is known to panic on translating invalid wasm
  modules. We also already do a lot of fuzzing of translation of wasm
  modules, so this isn't necessarily buying us anything over what we're
  already fuzzing.

* `reader_parse_test` - discovered in #1205 we already found some "bugs"
  in this but it may not necessarily rise to the level of "needs to be
  run on oss-fuzz for us to find more bugs" yet. It looks like this is
  still somewhat internal so we can re-enable when we've got folks to
  fix the fuzz bugs coming in.

Closes #1205
This commit is contained in:
Alex Crichton
2020-03-04 13:54:11 -06:00
committed by GitHub
parent d5c0f6bff8
commit 19d8ff2bf5
4 changed files with 0 additions and 51 deletions

View File

@@ -46,15 +46,3 @@ name = "differential"
path = "fuzz_targets/differential.rs"
test = false
doc = false
[[bin]]
name = "translate_module"
path = "fuzz_targets/translate_module.rs"
test = false
doc = false
[[bin]]
name = "reader_parse_test"
path = "fuzz_targets/reader_parse_test.rs"
test = false
doc = false

View File

@@ -1,12 +0,0 @@
#![no_main]
use libfuzzer_sys::fuzz_target;
use std::str;
fuzz_target!(|data: &[u8]| {
if let Ok(s) = str::from_utf8(data) {
let options = cranelift_reader::ParseOptions::default();
let _ = cranelift_reader::parse_test(s, options);
}
});

View File

@@ -1,17 +0,0 @@
#![no_main]
use cranelift_codegen::{isa, settings};
use cranelift_wasm::{translate_module, DummyEnvironment, ReturnMode};
use libfuzzer_sys::fuzz_target;
use std::str::FromStr;
use target_lexicon::triple;
use wasmtime_fuzzing::generators;
fuzz_target!(|data: generators::WasmOptTtf| {
let flags = settings::Flags::new(settings::builder());
let triple = triple!("x86_64");
let isa = isa::lookup(triple).unwrap().finish(flags);
let mut dummy_environ =
DummyEnvironment::new(isa.frontend_config(), ReturnMode::NormalReturns, false);
translate_module(&data.wasm, &mut dummy_environ).unwrap();
});