Closed
Description
#!stacks
"goPanicSliceAcap" && "fixInitStmt:+10"
Issue created by stacks.
This is not how to use safetoken:
// Try to extract a statement from the BadExpr.
start, end, err := safetoken.Offsets(tok, bad.Pos(), bad.End()-1)
if err != nil {
return false
}
stmtBytes := src[start : end+1]
stmt, err := parseStmt(tok, bad.Pos(), stmtBytes)
if err != nil {
return false
}
This stack LKUsng
was reported by telemetry:
crash/crash
runtime.gopanic:+69
runtime.goPanicSliceAcap:+2
golang.org/x/tools/gopls/internal/cache/parsego.fixInitStmt:+10
golang.org/x/tools/gopls/internal/cache/parsego.fixAST.func1:+27
golang.org/x/tools/gopls/internal/cache/parsego.walkASTWithParent.func1:+17
go/ast.inspector.Visit:+1
go/ast.Walk:+1
go/ast.Walk:+224
go/ast.walkList[...]:=21
go/ast.Walk:+178
go/ast.Walk:+239
go/ast.walkList[...]:=21
go/ast.Walk:+178
go/ast.Walk:+299
go/ast.walkList[...]:=21
go/ast.Walk:+308
go/ast.Inspect:=372
golang.org/x/tools/gopls/internal/cache/parsego.walkASTWithParent:+2
golang.org/x/tools/gopls/internal/cache/parsego.fixAST:+2
golang.org/x/tools/gopls/internal/cache/parsego.Parse:+57
golang.org/x/tools/[email protected] go1.24.0 linux/amd64 vscode (2)
Dups: Dyo-dQ Cys7zA hq9Myg 7jyMQQ sM9gIg _GxDgw EiTsgQ MISCIg 55dYaQ