Skip to content

Commit

Permalink
Fix component_api fuzzer by reducing flags (bytecodealliance#8944)
Browse files Browse the repository at this point in the history
This fixes fuzzing with a recent update to wasm-tools which limited the
number of flags to 32.
  • Loading branch information
alexcrichton authored Jul 12, 2024
1 parent f2e689c commit 68d3d83
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/misc/component-fuzz-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ impl Type {
err: Type::generate_opt(u, depth - 1, fuel)?.map(Box::new),
},
20 => {
// Generate 1 flag all the way up to 65 flags which exercises
// the 1 to 3 x u32 cases.
let amt = u.int_in_range(1..=(*fuel).min(65))?;
let amt = u.int_in_range(1..=(*fuel).min(32))?;
*fuel -= amt;
Type::Flags(amt)
}
Expand Down

0 comments on commit 68d3d83

Please sign in to comment.