Skip to content
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

cmd/link: suspicious use of (*cmd/internal/bio/buf.Reader).Seek #28556

alandonovan opened this issue Nov 2, 2018 · 3 comments


Copy link

@alandonovan alandonovan commented Nov 2, 2018

While a running a recent test of vet, it flagged the (*buf.Reader).Seek method as not having a proper return type (int64, error). Instead it handles errors by calling log.Fatal, yet most callers of this function seem to assume it returns a negative number to indicate failure.

Someone who knows this code should probably audit it.


This comment has been minimized.

Copy link

@bradfitz bradfitz commented Nov 2, 2018

I remember some clean-ups some time ago to move towards using the stdlib types. I assume the old seeker was C-ish and returned negative and we didn't convert it all when moving to Go stuff.

/cc @davecheney


This comment has been minimized.

Copy link

@alexyak1 alexyak1 commented Nov 23, 2018


This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 23, 2018

Change mentions this issue: math: Fix suspicious use of (*cmd/internal/bio/buf.Reader).Seek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.