| commit | 8995e84ac64dd5d614f851a60d97ba026a9e6fb1 | [log] [tgz] |
|---|---|---|
| author | qmuntal <quimmuntal@gmail.com> | Tue Aug 19 12:10:54 2025 +0200 |
| committer | Cherry Mui <cherryyz@google.com> | Mon Aug 25 11:19:12 2025 -0700 |
| tree | 3b212d1458909c0520a2c81f8b197c46ff5dcf93 | |
| parent | 749dff880af3e7ac0b41fbc6a41cfb6fff6e80b9 [diff] |
[release-branch.go1.25] internal/poll: set the correct file offset in FD.Seek for Windows overlapped handles Windows doesn't keep the file pointer for overlapped file handles. To work around this, we keep track of the current offset ourselves and use it on every Read/Write operation. When the user calls File.Seek with whence == io.SeekCurrent, it expects that the offset we keep track of is also accounted for, else the the seek'ed value won't match the file pointer seen by the user. Fixes #75083. Change-Id: Ieca7c3779e5349292883ffc293a8474088a4dec7 Reviewed-on: https://go-review.googlesource.com/c/go/+/697275 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> (cherry picked from CL 697275) Reviewed-on: https://go-review.googlesource.com/c/go/+/697995
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attribution license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.