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

Method recompute_input_prioritization

hail-fuzz/src/queue.rs:124–142  ·  view source on GitHub ↗

Recomputes the inputs in the corpus that should be favored.

(&mut self)

Source from the content-addressed store, hash-verified

122
123 /// Recomputes the inputs in the corpus that should be favored.
124 pub fn recompute_input_prioritization(&mut self) {
125 tracing::debug!("recomputing input prioritization");
126
127 self.test_cases.iter_mut().for_each(|x| {
128 x.favored = false;
129 x.has_unique_edge = false;
130 });
131
132 for group in self.coverage_hits.values().filter(|x| !x.is_empty()) {
133 let Some(&min) = group.iter().min_by_key(|id| self.test_cases[**id].favored_metric())
134 else {
135 continue;
136 };
137 self.test_cases[min].favored = true;
138 if group.len() == 1 {
139 self.test_cases[min].has_unique_edge = true;
140 }
141 }
142 }
143
144 fn is_favored(&self, id: usize) -> bool {
145 self.test_cases[id].favored

Callers 1

fuzzing_loopFunction · 0.80

Calls 3

is_emptyMethod · 0.80
favored_metricMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected