diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-04-11 14:08:10 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-04-15 08:18:26 +0000 |
| commit | 81b407fe4e14e1e40fa060509157143e51ec1739 (patch) | |
| tree | ccaf1229e9ce952bbb832d81c9c5d0501ebdb0de /pkg/fuzzer | |
| parent | 0bd6db418098e2d98a2edf948b41410d3d9f9e70 (diff) | |
pkg/manager: wait until corpus is triaged for diff fuzzing
Track the right moment to start bug reproductions more exactly:
1) Either once 90% of the corpus is triaged (*).
2) Or once we are past 50% of the time dedicated for fuzzing.
Whatever happens earlier.
(*) The last percents are usually quite slow and they bring much less
covered PCs that all the previous ones.
Diffstat (limited to 'pkg/fuzzer')
| -rw-r--r-- | pkg/fuzzer/fuzzer.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/fuzzer/fuzzer.go b/pkg/fuzzer/fuzzer.go index 3e5f94fc3..17c5af47b 100644 --- a/pkg/fuzzer/fuzzer.go +++ b/pkg/fuzzer/fuzzer.go @@ -106,8 +106,12 @@ func newExecQueues(fuzzer *Fuzzer) execQueues { return ret } +func (fuzzer *Fuzzer) CandidatesToTriage() int { + return fuzzer.statCandidates.Val() + fuzzer.statJobsTriageCandidate.Val() +} + func (fuzzer *Fuzzer) CandidateTriageFinished() bool { - return fuzzer.statCandidates.Val()+fuzzer.statJobsTriageCandidate.Val() == 0 + return fuzzer.CandidatesToTriage() == 0 } func (fuzzer *Fuzzer) execute(executor queue.Executor, req *queue.Request) *queue.Result { |
