-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: Hover: nil deref in golang.StdSymbolOf #70969
Labels
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
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
Dec 23, 2024
I assume there's the usual off-by-one in the line numbering and that the actual panic is the named.Obj dereference. |
Change https://go.dev/cl/638597 mentions this issue: |
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
Dec 23, 2024
This is a defensive check against a nil result from ReceiverNamed; I'm unable to reproduce the panic though. It would have to be hovering over a reference to a method whose receiver is not a named type (or alias or pointer to named), such as a slice type, an undeclared type, or somesuch. Updates golang/go#70969 Change-Id: I1cc2bc3d311a88304a2af525d38c1143f4c513a1 Reviewed-on: https://go-review.googlesource.com/c/tools/+/638597 Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Fixed by https://go.dev/cl/638597. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Issue created by stacks.
This stack
J7Opuw
was reported by telemetry:crash/crash
runtime.gopanic:+69
runtime.panicmem:=262
runtime.sigpanic:+19
golang.org/x/tools/gopls/internal/golang.StdSymbolOf:+27
golang.org/x/tools/gopls/internal/golang.hover:+472
golang.org/x/tools/gopls/internal/golang.Hover:+4
golang.org/x/tools/gopls/internal/server.(*server).Hover:+30
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+335
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3
runtime.goexit:+0
Dups: 9xr_OA
The text was updated successfully, but these errors were encountered: