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

Open
alandonovan opened this Issue Nov 2, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@alandonovan
Contributor

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.

@bradfitz

This comment has been minimized.

Member

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

@alexyak1

This comment has been minimized.

alexyak1 commented Nov 23, 2018

@gopherbot

This comment has been minimized.

gopherbot commented Nov 23, 2018

Change https://golang.org/cl/151043 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