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:
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@@ -108,16 +108,6 @@ jobs:
|
|||||||
| shuf \
|
| shuf \
|
||||||
| head -n 100 \
|
| head -n 100 \
|
||||||
| xargs cargo fuzz run differential --release --debug-assertions
|
| xargs cargo fuzz run differential --release --debug-assertions
|
||||||
- run: |
|
|
||||||
find fuzz/corpus/reader_parse_test -type f \
|
|
||||||
| shuf \
|
|
||||||
| head -n 100 \
|
|
||||||
| xargs cargo fuzz run reader_parse_test --release --debug-assertions
|
|
||||||
- run: |
|
|
||||||
find fuzz/corpus/translate_module -type f \
|
|
||||||
| shuf \
|
|
||||||
| head -n 100 \
|
|
||||||
| xargs cargo fuzz run translate_module --release --debug-assertions
|
|
||||||
|
|
||||||
# Install wasm32-unknown-emscripten target, and ensure `crates/wasi-common`
|
# Install wasm32-unknown-emscripten target, and ensure `crates/wasi-common`
|
||||||
# compiles to Emscripten.
|
# compiles to Emscripten.
|
||||||
|
|||||||
@@ -46,15 +46,3 @@ name = "differential"
|
|||||||
path = "fuzz_targets/differential.rs"
|
path = "fuzz_targets/differential.rs"
|
||||||
test = false
|
test = false
|
||||||
doc = 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
|
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -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();
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user