golang/go

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

Open

#28,556 opened on Nov 2, 2018

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Go (19,008 forks)batch import
NeedsInvestigationcompiler/runtimehelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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.

Contributor guide