Skip to content

Commit 37d76bc

Browse files
committed
update to Wasmi v0.49.0 for differential fuzzer
1 parent ea3ab58 commit 37d76bc

File tree

4 files changed

+37
-21
lines changed

4 files changed

+37
-21
lines changed

Cargo.lock

Lines changed: 27 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/fuzz/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ wasmtime = { workspace = true, optional = true, features = [
2424
wasm-smith = { workspace = true }
2525
wasmprinter = { workspace = true }
2626
wasmi-stack = { package = "wasmi", version = "0.31.2", features = ["std"], optional = true }
27-
wasmi-v048 = { package = "wasmi", version = "0.48.0", features = ["std", "simd", "extra-checks"], optional = true }
27+
wasmi-v049 = { package = "wasmi", version = "0.49.0", features = ["std", "simd", "extra-checks"], optional = true }
2828
arbitrary = "1.3.2"
2929
sha2 = "0.10"
3030
anyhow = "1.0.91"
@@ -33,7 +33,7 @@ anyhow = "1.0.91"
3333
default = []
3434
differential = [
3535
"dep:wasmi-stack",
36-
"dep:wasmi-v048",
36+
"dep:wasmi-v049",
3737
"dep:wasmtime",
3838
]
3939
experimental-translator = [

crates/fuzz/src/oracle/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub use self::{
22
exports::{ModuleExports, StringSequenceIter},
33
wasmi::WasmiOracle,
44
wasmi_stack::WasmiStackOracle,
5-
wasmi_v048::WasmiV048Oracle,
5+
wasmi_v049::WasmiV048Oracle,
66
wasmtime::WasmtimeOracle,
77
};
88
use crate::{FuzzError, FuzzSmithConfig, FuzzVal};
@@ -11,7 +11,7 @@ use arbitrary::{Arbitrary, Unstructured};
1111
mod exports;
1212
mod wasmi;
1313
mod wasmi_stack;
14-
mod wasmi_v048;
14+
mod wasmi_v049;
1515
mod wasmtime;
1616

1717
/// Trait implemented by differential fuzzing oracles.

crates/fuzz/src/oracle/wasmi_v048.rs renamed to crates/fuzz/src/oracle/wasmi_v049.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ use crate::{
44
FuzzSmithConfig,
55
FuzzVal,
66
};
7-
use wasmi_v048::{
7+
use wasmi_v049::{
88
core::{TrapCode, V128},
99
Config,
1010
Engine,
1111
Error,
1212
ExternRef,
13-
FuncRef,
13+
Func,
1414
Instance,
1515
Linker,
1616
Module,
17+
Ref,
1718
StackLimits,
1819
Store,
1920
StoreLimits,
@@ -63,10 +64,7 @@ impl DifferentialOracleMeta for WasmiV048Oracle {
6364
let mut store = Store::new(&engine, limiter);
6465
store.limiter(|lim| lim);
6566
let module = Module::new(store.engine(), wasm).unwrap();
66-
let Ok(unstarted_instance) = linker.instantiate(&mut store, &module) else {
67-
return None;
68-
};
69-
let Ok(instance) = unstarted_instance.ensure_no_start(&mut store) else {
67+
let Ok(instance) = linker.instantiate_and_start(&mut store, &module) else {
7068
return None;
7169
};
7270
Some(Self {
@@ -129,11 +127,11 @@ impl From<FuzzVal> for Val {
129127
FuzzVal::V128(value) => Self::V128(V128::from(value)),
130128
FuzzVal::FuncRef { is_null } => {
131129
assert!(is_null);
132-
Self::FuncRef(FuncRef::null())
130+
Self::FuncRef(<Ref<Func>>::Null)
133131
}
134132
FuzzVal::ExternRef { is_null } => {
135133
assert!(is_null);
136-
Self::ExternRef(ExternRef::null())
134+
Self::ExternRef(<Ref<ExternRef>>::Null)
137135
}
138136
}
139137
}

0 commit comments

Comments
 (0)