]> Cypherpunks repositories - gostls13.git/commit
internal/fuzz: properly handle duplicates during cache loading
authorRoland Shoemaker <roland@golang.org>
Sun, 30 Jan 2022 19:21:28 +0000 (11:21 -0800)
committerRoland Shoemaker <roland@golang.org>
Tue, 1 Feb 2022 16:10:04 +0000 (16:10 +0000)
commit93fe469de5388b71af2aa2c959dc485fa3d4bee3
tree7a7abb7ad22fadffc59524fa16b8d6b0b59c749b
parentf1e7dcb49cba50203d656f931c3fb90b29727629
internal/fuzz: properly handle duplicates during cache loading

When loading the corpus, if the cache contained an entry which was a
duplicate of an entry added using f.Add, coordinator.addCorpusEntries
would return early, ignoring everything after this entry in the cache.

Instead, skip duplicates as intended, and continue to load the rest of
the cache.

Fixes #50913

Change-Id: I3a64b93cbb217c5c364a9f8d0005752e9e9d10ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/381960
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/testdata/script/test_fuzz_dup_cache.txt [new file with mode: 0644]
src/internal/fuzz/fuzz.go