[dev.fuzz] internal/fuzz: refactor in preparation for GOFUZZCACHE
Several small changes, most related to GOFUZZCACHE.
* Use separate channels to send crashers and interesting values to the
coordinator.
* Add a new type, crasherEntry, which is a corpusEntry with an
error message.
* Workers now send fatal errors to the coordinator via errC instead of
returning or closing doneC.
* In CoordinateFuzzing, defer code that closes doneC and waits for
workers to stop. This is the only place where doneC is closed.
* In workerServer and workerClient, always pass input values through
shared memory instead of RPC messages or arguments to avoid
confusion.
* Rename sharedMem.value to valueRef and add valueCopy to make it
clearer whether a reference or copy is needed.
* mutate now operates on shared memory directly.
* mutate will not panic on empty input.
Change-Id: I6e57354875508f0ac4483ed2728f3ba18dc938c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/275533
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jay Conrod <jayconrod@google.com> Reviewed-by: Katie Hockman <katie@golang.org>