Determine the maximum number of mutations to try. This number increases the longer it takes to find new inputs. @todo: these ranges were selected to be similar the havoc stacking factor used by AFL++, but it is possible that there are better values.
(fuzzer: &Fuzzer)
| 182 | /// @todo: these ranges were selected to be similar the havoc stacking factor used by AFL++, but it |
| 183 | /// is possible that there are better values. |
| 184 | fn log2_max_mutations(fuzzer: &Fuzzer) -> u32 { |
| 185 | let max_find_gap = |
| 186 | fuzzer.input_id.map(|id| fuzzer.corpus[id].metadata.max_find_gap).unwrap_or(0); |
| 187 | match max_find_gap { |
| 188 | ..=1000 => 3, |
| 189 | ..=10000 => 4, |
| 190 | ..=100000 => 5, |
| 191 | ..=1000000 => 6, |
| 192 | ..=10000000 => 7, |
| 193 | _ => 8, |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | fn max_mutations(fuzzer: &Fuzzer) -> u32 { |
| 198 | let max_find_gap = |