-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
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/memory-corruption"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)gopls/telemetry-wins
Description
#!stacks
"sigpanic" && "types.(*Var).Name:+0" && "go/types.(*Checker).ident:+30"
Issue created by stacks.
We have a non-nil Object interface value (witness dominating control flow), evidently containing a *types.Var (see traceback), whose Name() method call crashes. The only instruction in Var.Name is a 2-word load from the object.name field, so the *types.Var pointer is either nil or invalid.
scope, obj := check.lookupScope(e.Name)
switch obj {
case nil:
...
return
...
}
...
_, gotType := obj.(*TypeName)
if !gotType && wantType {
check.errorf(e, NotAType, "%s is not a type", obj.Name()) <----- panic loading offset 24 of *types.Var pointerThis stack t8TEng was reported by telemetry:
crash/crashruntime.throw:+9runtime.sigpanic:+33go/types.(*Var).Name:+0go/types.(*Checker).ident:+30go/types.(*Checker).exprInternal:+11go/types.(*Checker).rawExpr:+10go/types.(*Checker).exprOrType:+1go/types.(*Checker).selector:+97go/types.(*Checker).exprInternal:+308go/types.(*Checker).rawExpr:+10go/types.(*Checker).exprOrType:+1go/types.(*Checker).selector:+97go/types.(*Checker).exprInternal:+308go/types.(*Checker).rawExpr:+10go/types.(*Checker).exprOrType:+1go/types.(*Checker).callExpr:+14
golang.org/x/tools/gopls@v0.18.1 go1.23.6 linux/amd64 vscode (1)
Metadata
Metadata
Assignees
Labels
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/memory-corruption"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)"can't happen" gopls crashes (races, unsafe, miscompile, runtime bugs, faulty HW)gopls/telemetry-wins