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

Method compute_weights

hail-fuzz/src/dictionary.rs:30–35  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

28
29impl Dictionary {
30 pub fn compute_weights(&mut self) {
31 if self.weights.is_some() || self.entries.is_empty() || !ENABLE_DICTIONARY_WEIGHTS {
32 return;
33 }
34 self.weights = weight_dictionary_by_frequent_items(&self.entries);
35 }
36
37 pub fn choose<R: Rng>(&self, rng: &mut R) -> Option<(&[u8], u8)> {
38 let index = match ENABLE_DICTIONARY_WEIGHTS {

Callers 5

newMethod · 0.80
extend_current_inputMethod · 0.80
fuzz_oneMethod · 0.80
havoc_v1Method · 0.80
havoc_v2Method · 0.80

Calls 2

is_emptyMethod · 0.80

Tested by

no test coverage detected