File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ impl Arbitrary<'_> for FuzzSmithConfig {
105105 custom_page_sizes_enabled : true ,
106106 bulk_memory_enabled : true ,
107107 reference_types_enabled : false , // TODO: re-enable reference-types for differential fuzzing
108- simd_enabled : false ,
108+ simd_enabled : true ,
109109 multi_value_enabled : true ,
110110 memory64_enabled : true ,
111111 saturating_float_to_int_enabled : true ,
@@ -171,6 +171,13 @@ impl FuzzSmithConfig {
171171 pub fn disable_memory64 ( & mut self ) {
172172 self . inner . memory64_enabled = false ;
173173 }
174+
175+ /// Disable the Wasm `simd` proposal.
176+ ///
177+ /// This is required by some supported Wasm runtime oracles.
178+ pub fn disable_simd ( & mut self ) {
179+ self . inner . simd_enabled = false ;
180+ }
174181}
175182
176183impl From < FuzzSmithConfig > for wasm_smith:: Config {
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ impl DifferentialOracleMeta for WasmiStackOracle {
3434 config. disable_custom_page_sizes ( ) ;
3535 config. disable_memory64 ( ) ;
3636 config. disable_wide_arithmetic ( ) ;
37+ config. disable_simd ( ) ;
3738 }
3839
3940 fn setup ( wasm : & [ u8 ] ) -> Option < Self >
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ impl From<Val> for FuzzVal {
106106 Val :: I64 ( value) => Self :: I64 ( value) ,
107107 Val :: F32 ( value) => Self :: F32 ( f32:: from_bits ( value) ) ,
108108 Val :: F64 ( value) => Self :: F64 ( f64:: from_bits ( value) ) ,
109+ Val :: V128 ( value) => Self :: V128 ( value. as_u128 ( ) ) ,
109110 Val :: FuncRef ( value) => Self :: FuncRef {
110111 is_null : value. is_none ( ) ,
111112 } ,
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ impl PartialEq for FuzzVal {
5353 ( Self :: I64 ( l) , Self :: I64 ( r) ) => l == r,
5454 ( Self :: F32 ( l) , Self :: F32 ( r) ) => l. to_bits ( ) == r. to_bits ( ) ,
5555 ( Self :: F64 ( l) , Self :: F64 ( r) ) => l. to_bits ( ) == r. to_bits ( ) ,
56+ ( Self :: V128 ( l) , Self :: V128 ( r) ) => l == r,
5657 ( Self :: FuncRef { is_null : l } , Self :: FuncRef { is_null : r } ) => l == r,
5758 ( Self :: ExternRef { is_null : l } , Self :: ExternRef { is_null : r } ) => l == r,
5859 _ => false ,
You can’t perform that action at this time.
0 commit comments