MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / random_weights

Method random_weights

hail-fuzz/src/havoc.rs:259–266  ·  view source on GitHub ↗
(rng: &mut R)

Source from the content-addressed store, hash-verified

257
258 #[allow(unused)]
259 fn random_weights<R: Rng>(rng: &mut R) -> Self {
260 let weights = ALL_MUTATIONS.iter().map(|_| rng.gen_range(0..100)).collect();
261 let Ok(mutation_distr) = WeightedAliasIndex::new(weights)
262 else {
263 return HavocMutator::new();
264 };
265 Self { mutation_distr }
266 }
267
268 pub(crate) fn havoc_bytes<R>(
269 &self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected