fuzzbug fix
This commit is contained in:
parent
74901c0842
commit
5ac961607f
|
@ -121,6 +121,11 @@ fuzz_target!(|module: wasm_smith::ConfiguredModule<Config>| {
|
||||||
let parsed_module = Module::from_wasm_bytes(&orig_bytes[..]).unwrap();
|
let parsed_module = Module::from_wasm_bytes(&orig_bytes[..]).unwrap();
|
||||||
let roundtrip_bytes = parsed_module.to_wasm_bytes();
|
let roundtrip_bytes = parsed_module.to_wasm_bytes();
|
||||||
|
|
||||||
|
if let Ok(filename) = std::env::var("FUZZ_DUMP_WASM") {
|
||||||
|
std::fs::write(format!("{}_orig.wasm", filename), &orig_bytes[..]).unwrap();
|
||||||
|
std::fs::write(format!("{}_roundtrip.wasm", filename), &roundtrip_bytes[..]).unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
let roundtrip_module = wasmtime::Module::new(&engine, &roundtrip_bytes[..])
|
let roundtrip_module = wasmtime::Module::new(&engine, &roundtrip_bytes[..])
|
||||||
.expect("failed to parse roundtripped wasm");
|
.expect("failed to parse roundtripped wasm");
|
||||||
let roundtrip_instance = wasmtime::Instance::new(&mut store, &roundtrip_module, &[])
|
let roundtrip_instance = wasmtime::Instance::new(&mut store, &roundtrip_module, &[])
|
||||||
|
|
|
@ -1134,6 +1134,7 @@ impl<'a, 'b> FunctionBodyBuilder<'a, 'b> {
|
||||||
let values = values.to_vec();
|
let values = values.to_vec();
|
||||||
self.body.end_block(block, Terminator::Return { values });
|
self.body.end_block(block, Terminator::Return { values });
|
||||||
}
|
}
|
||||||
|
self.cur_block = None;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn push_block_params(&mut self, num_params: usize) {
|
fn push_block_params(&mut self, num_params: usize) {
|
||||||
|
|
Loading…
Reference in a new issue