]> Cypherpunks repositories - gostls13.git/commit
internal/fuzz: release lock when reading file fails
authorRoland Shoemaker <roland@golang.org>
Thu, 16 Mar 2023 03:53:10 +0000 (20:53 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 16 Mar 2023 19:51:23 +0000 (19:51 +0000)
commite91876f4406a89eb0b0c07e93a6ae4e4f32d48b6
tree58ed5fe0485906d53c4f7c5fc45b4b792969d1c2
parent192814985d28c2f63c13861aa918e394f2ee9f6e
internal/fuzz: release lock when reading file fails

When corpusEntryData failed in workerClient.fuzz and
workerClient.minimize, the shared memory mutex wasn't properly given up,
which would cause a deadlock when worker.cleanup was called.

This was tickled by #59062, wherein the fuzz cache directory would be
removed during operation of the fuzzer, causing corpusEntryData to fail
because the entry files no longer existed.

Updates #51484

Change-Id: Iea284041c20d1581c662bddbbc7e12191771a364
Reviewed-on: https://go-review.googlesource.com/c/go/+/476815
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/testdata/script/test_fuzz_err_deadlock.txt [new file with mode: 0644]
src/internal/fuzz/worker.go