-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
What version of Go are you using (go version)?
1.17.2 linux/amd64
$ go version 1.17.2 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
linux
go env Output
$ go env
What did you do?
run go tool buildid -w <filepath> on a go 1.5 binary and the following error will occur:
panic: runtime error: slice bounds out of range [:-1]
goroutine 1 [running]:
main.main()
/usr/local/go/src/cmd/buildid/buildid.go:56 +0x60d
The line:
Line 56 in cfad1ff
| newID := id[:strings.LastIndex(id, "/")] + "/" + buildid.HashToString(hash) |
This is because in go 1.5 the contentID did not exist, so the slash seperator is not present, causing issues. The buildid tool doesn't consider legacy buildID/actionID/contentID layouts.
What did you expect to see?
The buildID / contentID to be written
What did you see instead?
crash
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.