-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/telemetry-wins
Milestone
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
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/telemetry-wins