Change information
Commit message:
runtime/poll: fix race condition in Window's SendFile
The destination of SendFile is a socket, which doesn't support file
offsets. There is no need to keep track of the file offset, and doing
so causes a race between SendFile and Read.
While here, make sure that SendFile tests do call poll.SendFile.
Fixes #78015
Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-race,gotip-linux-amd64-race
Change-Id: I8cce45c0c110e848d9bdbc5ba340b92ca041f0a4
Files:
- M src/internal/poll/sendfile_windows.go
- M src/net/sendfile.go
- M src/net/sendfile_stub.go
- M src/net/sendfile_test.go
- M src/net/sendfile_windows.go
Change size: S
Delta: 5 files changed, 19 insertions(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Alex Brainman, +2 by Damien Neil, +1 by Mark Freeman
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI