New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: File.Seek does not work past EOF on NaCl #21728

dsnet opened this Issue Sep 1, 2017 · 1 comment


None yet
3 participants

dsnet commented Sep 1, 2017

Consider the following snippet:

f, err := ioutil.TempFile("", "")
if err != nil {
// f.Truncate(1000)
if _, err := f.Seek(1000, io.SeekCurrent); err != nil {

On NaCl, this current fails with:

seek /tmp/054003078: Invalid argument

If you uncomment the Truncate, then it works again. This is contrary to every other OS that Go supports, where you can seek past EOF and start writing and everything in-between is implicitly filled with zeros.


This comment has been minimized.

gopherbot commented Dec 7, 2017

Change mentions this issue: syscall: make Seek use SetFilePointerEx on Windows, allowing large seek offsets

gopherbot pushed a commit that referenced this issue Dec 7, 2017

syscall: make Seek use SetFilePointerEx on Windows, allowing large se…
…ek offsets

Fixes #21681
Updates #21728

Change-Id: I79cf4564c1355ecab891102d4215cbbffd8eb0ce
Reviewed-by: Ian Lance Taylor <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment