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

Method next_input

hail-fuzz/src/queue.rs:456–478  ·  view source on GitHub ↗
(&mut self, corpus: &CorpusStore<MultiStream>)

Source from the content-addressed store, hash-verified

454
455impl InputSource for CoverageQueue {
456 fn next_input(&mut self, corpus: &CorpusStore<MultiStream>) -> Option<InputId> {
457 let id = match self.new.pop() {
458 // Fuzz small, new entries first, but ensure we haven't already found a better input.
459 Some(entry) => {
460 if corpus.is_favored(entry.id) {
461 entry.id
462 }
463 else {
464 self.queue.push_back(entry.id);
465 self.queue.pop_front()?
466 }
467 }
468 // Fallback to the next scheduled input,
469 None => self.queue.pop_front()?,
470 };
471
472 if id == 0 {
473 self.cycles += 1;
474 }
475
476 self.queue.push_back(id);
477 Some(id)
478 }
479}
480
481impl InputQueue for CoverageQueue {

Callers 1

fuzzing_loopFunction · 0.80

Calls 1

is_favoredMethod · 0.80

Tested by

no test coverage detected