]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] internal/fuzz: fix two bugs in BenchmarkWorkerFuzzOverhead
authorJay Conrod <jayconrod@google.com>
Mon, 12 Jul 2021 21:31:58 +0000 (14:31 -0700)
committerJay Conrod <jayconrod@google.com>
Mon, 19 Jul 2021 21:11:08 +0000 (21:11 +0000)
commitd14b7011a57fd7638dd4b67f1c2d031edf49f36e
tree65a5da7320a798174f24005e2e5418eea847a2df
parent988d0248b404a82d8f5c5973610e8a56bffb38f4
[dev.fuzz] internal/fuzz: fix two bugs in BenchmarkWorkerFuzzOverhead

* The exec count must be set to 0 before calling
  workerServer.fuzz. This was causing fuzz to run indefinitely after
  the first benchmark iteration, since it wouldn't hit the termination
  condition of being equal to fuzzArgs.Limit.
* Added an assertion that the count must be lower than fuzzArgs.Limit
  at the beginning of workerServer.fuzz.
* Also closed and deleted shared memory at the end of each benchmark run.

Change-Id: Iab465f8a4997ebd652aec04d0ff9bb60b802829e
Reviewed-on: https://go-review.googlesource.com/c/go/+/334129
Trust: Jay Conrod <jayconrod@google.com>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
src/internal/fuzz/worker.go
src/internal/fuzz/worker_test.go