Skip to content

Commit ac3a464

Browse files
authored
Randomly set disallow_traps in Config::arbitrary (#1453)
Seems like setting this roughly 50% of the time is fine, since fuzzing often involves executing the Wasm, and trapping Wasm is generally less interesting than non-trapping Wasm.
1 parent 9801046 commit ac3a464

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/wasm-smith/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ impl<'a> Arbitrary<'a> for Config {
681681
},
682682
table_max_size_required: u.arbitrary()?,
683683
max_table_elements: u.int_in_range(0..=1_000_000)?,
684+
disallow_traps: u.arbitrary()?,
684685

685686
// These fields, unlike the ones above, are less useful to set.
686687
// They either make weird inputs or are for features not widely
@@ -712,7 +713,6 @@ impl<'a> Arbitrary<'a> for Config {
712713
exports: None,
713714
threads_enabled: false,
714715
export_everything: false,
715-
disallow_traps: false,
716716
tail_call_enabled: false,
717717
gc_enabled: false,
718718
generate_custom_sections: false,

0 commit comments

Comments
 (0)