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/go: "index out of range" panic with "list -e" involving multiple packages #59905
Labels
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
Comments
cagedmantis
added
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
GoCommand
cmd/go
labels
May 1, 2023
Change https://go.dev/cl/501978 mentions this issue: |
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Aug 7, 2023
Change https://go.dev/cl/516739 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Aug 9, 2023
When we were comparing the first element of import stacks when sorting depserrors we checked if the first stack was non empty, but not the second one. Do the check for both stacks. Fixes #61816 For #59905 Change-Id: Id5c11c2b1104eec93196a08c53372ee2ba97c701 Reviewed-on: https://go-review.googlesource.com/c/go/+/516739 Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org>
Change https://go.dev/cl/519658 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Aug 15, 2023
…lice When we were comparing the first element of import stacks when sorting depserrors we checked if the first stack was non empty, but not the second one. Do the check for both stacks. Fixes #61818 Updates #61816 For #59905 Change-Id: Id5c11c2b1104eec93196a08c53372ee2ba97c701 Reviewed-on: https://go-review.googlesource.com/c/go/+/516739 Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> (cherry picked from commit 58447d7) Reviewed-on: https://go-review.googlesource.com/c/go/+/519658 Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
GoCommand
cmd/go
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No, this panic does not happen with Go 1.20.3.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was writing a test for a tool of mine, and ran into a
go list
panic. I minimized it as follows, which can be run with https://pkg.go.dev/github.com/rogpeppe/go-internal/cmd/testscript:What did you expect to see?
Note that the input Go packages are broken due to copy-paste mistakes of mine. You can see the valid errors if you use
go run
instead:What did you see instead?
I guess there's no guarantee that ImportStack is non-empty?
FYI @matloob, as the code was recently added in https://go-review.googlesource.com/c/go/+/483515.
The text was updated successfully, but these errors were encountered: