]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] internal/fuzz: fix two bugs affecting windows
authorJay Conrod <jayconrod@google.com>
Fri, 26 Feb 2021 17:57:44 +0000 (12:57 -0500)
committerJay Conrod <jayconrod@google.com>
Tue, 9 Mar 2021 18:36:54 +0000 (18:36 +0000)
commitd4825819fe58e8531c7fcdf4ce27cec63824db25
tree2826c2ba84a1c914f78f3e20094a4090f2b7a2aa
parentac58614190c9dd1ca0a1a47bf7a29a4a7c501e72
[dev.fuzz] internal/fuzz: fix two bugs affecting windows

* Appending to the worker environment slice should reallocate it. On
  Windows, we pass handles through the environment, and concurrent
  workers were writing to the same memory, resulting in
  "The handle is invalid" errors.
* Instead of passing a handle to the temporary file, we pass its path
  to each worker instead. The worker is responsible for opening and
  closing the handle. Previously, all inheritable handles were
  inherited by all workers, even though only one was used. This
  prevented temporary files from being deleted after a worker stopped,
  because other workers would still have open handles to it.

Change-Id: If8b8bcfa5b03fbcadd10ef923b036bb0ee5dc3f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/297034
Trust: Jay Conrod <jayconrod@google.com>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
src/internal/fuzz/fuzz.go
src/internal/fuzz/sys_windows.go
src/internal/fuzz/worker.go