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

x/tools/gopls: xrefs.Index panics after "can't fail" pgf.PosRange #70446

Closed
adonovan opened this issue Nov 19, 2024 · 2 comments
Closed

x/tools/gopls: xrefs.Index panics after "can't fail" pgf.PosRange #70446

adonovan opened this issue Nov 19, 2024 · 2 comments
Assignees
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

#!stacks
"runtime.gopanic" && "xrefs.Index.func2:+3"

Issue created by stacks.

		nodeRange := func(n ast.Node) protocol.Range {
			rng, err := pgf.PosRange(n.Pos(), n.End())
			if err != nil {
				panic(err) // can't fail                  <-- CAN FAIL
			}
			return rng
		}

This stack LDqHyA was reported by telemetry:

golang.org/x/tools/[email protected] go1.23.3 linux/amd64 vscode (1)
@adonovan adonovan added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. gopls/telemetry-wins labels Nov 19, 2024
@gopherbot gopherbot added this to the Unreleased milestone Nov 19, 2024
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.17.0 Nov 19, 2024
@findleyr findleyr self-assigned this Nov 21, 2024
@findleyr findleyr added the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Nov 21, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/630675 mentions this issue: gopls/internal/crash: don't crash in xrefs on out of bound nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FixPending Issues that have a fix which has not yet been reviewed or submitted. gopls/telemetry-wins gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants