From 24d82c00908b7ce88f806bc92f0e5e5590a836bb Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 8 Aug 2024 15:54:45 +0200 Subject: pkg/fuzzer: don't retry triage in snapshot mode --- pkg/fuzzer/fuzzer.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/fuzzer') diff --git a/pkg/fuzzer/fuzzer.go b/pkg/fuzzer/fuzzer.go index 17b3d3391..afd131fc4 100644 --- a/pkg/fuzzer/fuzzer.go +++ b/pkg/fuzzer/fuzzer.go @@ -153,7 +153,12 @@ func (fuzzer *Fuzzer) processResult(req *queue.Request, res *queue.Result, flags // Corpus candidates may have flaky coverage, so we give them a second chance. maxCandidateAttempts := 3 if req.Risky() { + // In non-snapshot mode usually we are not sure which exactly input caused the crash, + // so give it one more chance. In snapshot mode we know for sure, so don't retry. maxCandidateAttempts = 2 + if fuzzer.Config.Snapshot { + maxCandidateAttempts = 0 + } } if len(triage) == 0 && flags&ProgFromCorpus != 0 && attempt < maxCandidateAttempts { fuzzer.enqueue(fuzzer.candidateQueue, req, flags, attempt+1) -- cgit mrf-deployment