#81814·Go

x/tools/gopls: stubmethods: SEGV after failed Cursor.FindByPos fails in GetIfaceStubInfo

Author: adonovanCreated Sep 28, 2026Updated Sep 28, 2026
LabelsNeedsInvestigationgoplsToolsgopls/telemetry-wins
#!stacks
"Cursor.Enclosing.func1:+1" && "sigpanic"

Issue created by stacks.

go
func GetIfaceStubInfo(fset *token.FileSet, info *types.Info, pgf *parsego.File, pos, end token.Pos) *IfaceStubInfo {
	cur, _ := pgf.Cursor().FindByPos(pos, end)
	for cur := range cur.Enclosing() {

This stack ilWB9Q was reported by telemetry:

golang.org/x/tools/[email protected] go1.27.0 windows/amd64 gopls.client=vscode (1)

Use this command to reproduce the executable: (HOME=$(mktemp -d); GOOS=windows GOARCH=amd64 GOTOOLCHAIN=go1.27.0 go install golang.org/x/tools/[email protected] && find $HOME/go/bin -type f) To disassemble: go tool objdump exe | less