Skip to content

Commit

Permalink
Merge pull request #3443 from manunio/fix-fuzz-errors
Browse files Browse the repository at this point in the history
Fix fuzz errors
  • Loading branch information
syrusakbary authored Jan 2, 2023
2 parents 30f0183 + 5542cf0 commit e531c7a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions fuzz/fuzz_targets/deterministic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fuzz_target!(|module: ConfiguredModule<NoImportsConfig>| {
compiler.enable_verifier();
compile_and_compare(
"universal-cranelift",
EngineBuilder::new(compiler.clone()),
EngineBuilder::new(compiler.clone()).engine(),
&wasm_bytes,
);

Expand All @@ -55,14 +55,14 @@ fuzz_target!(|module: ConfiguredModule<NoImportsConfig>| {
compiler.enable_verifier();
compile_and_compare(
"universal-llvm",
EngineBuilder::new(compiler.clone()),
EngineBuilder::new(compiler.clone()).engine(),
&wasm_bytes,
);

let compiler = Singlepass::default();
compile_and_compare(
"universal-singlepass",
EngineBuilder::new(compiler.clone()),
EngineBuilder::new(compiler.clone()).engine(),
&wasm_bytes,
);
});
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/metering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use libfuzzer_sys::{arbitrary, arbitrary::Arbitrary, fuzz_target};
use std::sync::Arc;
use wasm_smith::{Config, ConfiguredModule};
use wasmer::wasmparser::Operator;
use wasmer::{imports, CompilerConfig, EngineBuilder, Instance, Module, Store};
use wasmer::{imports, CompilerConfig, Instance, Module, Store};
use wasmer_compiler_cranelift::Cranelift;
use wasmer_middlewares::Metering;

Expand Down Expand Up @@ -57,7 +57,7 @@ fuzz_target!(|module: WasmSmithModule| {
compiler.push_middleware(metering);
let mut store = Store::new(compiler);
let module = Module::new(&store, &wasm_bytes).unwrap();
match Instance::new(&module, &imports! {}) {
match Instance::new(&mut store, &module, &imports! {}) {
Ok(_) => {}
Err(e) => {
let error_message = format!("{}", e);
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/universal_llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use libfuzzer_sys::{arbitrary, arbitrary::Arbitrary, fuzz_target};
use wasm_smith::{Config, ConfiguredModule};
use wasmer::{imports, CompilerConfig, EngineBuilder, Instance, Module, Store};
use wasmer::{imports, CompilerConfig, Instance, Module, Store};
use wasmer_compiler_llvm::LLVM;

#[derive(Arbitrary, Debug, Default, Copy, Clone)]
Expand Down Expand Up @@ -43,7 +43,7 @@ fuzz_target!(|module: WasmSmithModule| {
compiler.enable_verifier();
let mut store = Store::new(compiler);
let module = Module::new(&store, &wasm_bytes).unwrap();
match Instance::new(&module, &imports! {}) {
match Instance::new(&mut store, &module, &imports! {}) {
Ok(_) => {}
Err(e) => {
let error_message = format!("{}", e);
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/universal_singlepass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use libfuzzer_sys::{arbitrary, arbitrary::Arbitrary, fuzz_target};
use wasm_smith::{Config, ConfiguredModule};
use wasmer::{imports, EngineBuilder, Instance, Module, Store};
use wasmer::{imports, Instance, Module, Store};
use wasmer_compiler_singlepass::Singlepass;

#[derive(Arbitrary, Debug, Default, Copy, Clone)]
Expand Down Expand Up @@ -51,7 +51,7 @@ fuzz_target!(|module: WasmSmithModule| {
panic!("{}", e);
}
};
match Instance::new(&module, &imports! {}) {
match Instance::new(&mut store, &module, &imports! {}) {
Ok(_) => {}
Err(e) => {
let error_message = format!("{}", e);
Expand Down

0 comments on commit e531c7a

Please sign in to comment.