Skip to content

Commit

Permalink
fuzz loop should mutate up to 10% of values, not of bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-bell committed Aug 1, 2024
1 parent 349156c commit f8fc3c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@ public Input fuzz(Random random) {
LinearInput newInput = new LinearInput(this);

// Stack a bunch of mutations
int numMutations = sampleGeometric(random, Math.max(MEAN_MUTATION_COUNT, this.size() * 0.1));
int numMutations = sampleGeometric(random, Math.max(MEAN_MUTATION_COUNT, (this.size()/9) * 0.1)); // divide size by 9 to get the number of actual values
newInput.desc += ",havoc:"+numMutations;

boolean setToZero = random.nextDouble() < 0.1; // one out of 10 times
Expand Down

0 comments on commit f8fc3c5

Please sign in to comment.