]> Cypherpunks repositories - gostls13.git/commit
internal/poll: be explicit when using runtime netpoller
authorAlex Brainman <alex.brainman@gmail.com>
Mon, 25 Sep 2017 08:54:14 +0000 (18:54 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Tue, 26 Sep 2017 04:39:19 +0000 (04:39 +0000)
commit8e2d90dca8b5da00bf29cc6076b6b5a80aac7106
tree40fea22cc3f2da0e2835245f590de8171d6a6145
parent4cff104771fb6bffcf4d2bb9937aea3ff95be593
internal/poll: be explicit when using runtime netpoller

internal/poll package assumes that only net sockets use runtime
netpoller on windows. We get memory corruption if other file
handles are passed into runtime poller. Make FD.Init receive
and use useNetpoller argument, so FD.Init caller is explicit
about using runtime netpoller.

Fixes #21172

Change-Id: I60e2bfedf9dda9b341eb7a3e5221035db29f5739
Reviewed-on: https://go-review.googlesource.com/65810
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/internal/poll/fd_unix.go
src/internal/poll/fd_windows.go
src/net/fd_windows.go
src/os/file_windows.go