]> Cypherpunks repositories - gostls13.git/commit
runtime: filter i/o async entries using completion key on windows
authorWill Hawkins <hawkinsw@obs.cr>
Wed, 5 Apr 2023 07:15:56 +0000 (03:15 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 11 Apr 2023 19:08:56 +0000 (19:08 +0000)
commit7830180dcd13c028a1619f41bed0ac5e10a720e7
tree07a71b452edac4e43302a66e357ce5c4b5933457
parent05cd6cbb98a78f04fcfe018527fc8a50364bd0ee
runtime: filter i/o async entries using completion key on windows

In the case where a user program requests overlapped I/O directly on a
handlethat is managed by the runtime, it is possible that
runtime.netpoll will attempt to dereference a pointer with an invalid
value. This CL prevents the runtime from accessing the invalid pointer
value by adding a special key to each overlapped I/O operation that it
creates.

Fixes #58870

Co-authored-by: quimmuntal@gmail.com
Change-Id: Ib58ee757bb5555efba24c29101fc6d1a0dedd61a
Reviewed-on: https://go-review.googlesource.com/c/go/+/482495
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/internal/poll/fd_windows_test.go
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/runtime/netpoll_windows.go