]> Cypherpunks repositories - gostls13.git/commit
internal/poll: don't call SetFilePointerEx in Seek for overlapped handles
authorqmuntal <quimmuntal@gmail.com>
Thu, 21 Aug 2025 08:45:23 +0000 (10:45 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 26 Sep 2025 16:22:11 +0000 (09:22 -0700)
commit7d7cd6e07b65d7583f1c7648fc042fbe30352313
tree8457de46f6a0d39a229136477812e1ea5183c01f
parent41cba31e66c979c413a4368c4f3d82ebadf0fb5b
internal/poll: don't call SetFilePointerEx in Seek for overlapped handles

Overlapped handles don't have the file pointer updated when performing
I/O operations, so there is no need to call syscall.SetFilePointerEx in
FD.Seek. Updating the in-memory offset is sufficient.

Updates #74951 (provides a more complete fix)

Change-Id: Ibede6625cdbd501fc92cfdf8ce2782ec291af2b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/698035
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/internal/poll/fd_windows.go
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/os/os_windows_test.go