diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-05-31 10:18:59 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-06-03 15:04:36 +0000 |
| commit | 4dfd0208613afc9866f22849f14d5c9923d97194 (patch) | |
| tree | 4cfc8422c435efe761c310e5aa349efe8b15ae58 | |
| parent | 05abdec478c0e0186e19d301ba5bd67e553a0737 (diff) | |
syz-manager: don't duplicate seeds
If a seed is already in the corpus, don't use it again.
| -rw-r--r-- | syz-manager/manager.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/syz-manager/manager.go b/syz-manager/manager.go index bbc915556..2873f0c1a 100644 --- a/syz-manager/manager.go +++ b/syz-manager/manager.go @@ -682,10 +682,14 @@ func (mgr *Manager) loadCorpus() { seeds := 0 for _, seed := range mgr.seeds { _, item := mgr.loadProg(seed, fuzzer.ProgFromCorpus|fuzzer.ProgMinimized) - if item != nil { - candidates = append(candidates, *item) - seeds++ + if item == nil { + continue + } + if _, ok := mgr.corpusDB.Records[hash.String(item.Prog.Serialize())]; ok { + continue } + candidates = append(candidates, *item) + seeds++ } log.Logf(0, "%-24v: %v (%v broken, %v seeds)", "corpus", len(candidates), broken, seeds) mgr.seeds = nil |
