Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion crates/fuzz/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
custom_page_sizes_enabled: true,
bulk_memory_enabled: true,
reference_types_enabled: false, // TODO: re-enable reference-types for differential fuzzing
simd_enabled: false,
simd_enabled: true,
multi_value_enabled: true,
memory64_enabled: true,
saturating_float_to_int_enabled: true,
Expand Down Expand Up @@ -171,6 +171,13 @@
pub fn disable_memory64(&mut self) {
self.inner.memory64_enabled = false;
}

/// Disable the Wasm `simd` proposal.
///
/// This is required by some supported Wasm runtime oracles.
pub fn disable_simd(&mut self) {
self.inner.simd_enabled = false;

Check warning on line 179 in crates/fuzz/src/config.rs

View check run for this annotation

Codecov / codecov/patch

crates/fuzz/src/config.rs#L178-L179

Added lines #L178 - L179 were not covered by tests
}
}

impl From<FuzzSmithConfig> for wasm_smith::Config {
Expand Down
1 change: 1 addition & 0 deletions crates/fuzz/src/oracle/wasmi_stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
config.disable_custom_page_sizes();
config.disable_memory64();
config.disable_wide_arithmetic();
config.disable_simd();

Check warning on line 37 in crates/fuzz/src/oracle/wasmi_stack.rs

View check run for this annotation

Codecov / codecov/patch

crates/fuzz/src/oracle/wasmi_stack.rs#L37

Added line #L37 was not covered by tests
}

fn setup(wasm: &[u8]) -> Option<Self>
Expand Down
1 change: 1 addition & 0 deletions crates/fuzz/src/oracle/wasmtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
Val::I64(value) => Self::I64(value),
Val::F32(value) => Self::F32(f32::from_bits(value)),
Val::F64(value) => Self::F64(f64::from_bits(value)),
Val::V128(value) => Self::V128(value.as_u128()),

Check warning on line 109 in crates/fuzz/src/oracle/wasmtime.rs

View check run for this annotation

Codecov / codecov/patch

crates/fuzz/src/oracle/wasmtime.rs#L109

Added line #L109 was not covered by tests
Val::FuncRef(value) => Self::FuncRef {
is_null: value.is_none(),
},
Expand Down
1 change: 1 addition & 0 deletions crates/fuzz/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
(Self::I64(l), Self::I64(r)) => l == r,
(Self::F32(l), Self::F32(r)) => l.to_bits() == r.to_bits(),
(Self::F64(l), Self::F64(r)) => l.to_bits() == r.to_bits(),
(Self::V128(l), Self::V128(r)) => l == r,

Check warning on line 56 in crates/fuzz/src/value.rs

View check run for this annotation

Codecov / codecov/patch

crates/fuzz/src/value.rs#L56

Added line #L56 was not covered by tests
(Self::FuncRef { is_null: l }, Self::FuncRef { is_null: r }) => l == r,
(Self::ExternRef { is_null: l }, Self::ExternRef { is_null: r }) => l == r,
_ => false,
Expand Down