-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
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
"go/types.(*Package).Path:=34" && "gcimporter.(*exportWriter).exportPath:=688"
Issue created by stacks.
If you walk all the way up the stack, you get to this line, which writes the value of a constant. It passes pkg=nil (meaning "the current package"), yet somehow the nil pkg is plumbed all the way down to exportPath, which assumes it is non-nil.
func (w *exportWriter) value(typ types.Type, v constant.Value) {
w.typ(typ, nil)This stack 0BaS9w was reported by telemetry:
crash/crashruntime.gopanic:+69golang.org/x/tools/internal/gcimporter.iexportCommon.func1:+7runtime.gopanic:+50runtime.panicmem:=262runtime.sigpanic:+19go/types.(*Package).Path:=34golang.org/x/tools/internal/gcimporter.(*exportWriter).exportPath:=688golang.org/x/tools/internal/gcimporter.(*exportWriter).pkg:+4golang.org/x/tools/internal/gcimporter.(*exportWriter).doTyp:+119golang.org/x/tools/internal/gcimporter.(*iexporter).typOff:+4golang.org/x/tools/internal/gcimporter.(*exportWriter).typ:+1golang.org/x/tools/internal/gcimporter.(*exportWriter).typeList:+3golang.org/x/tools/internal/gcimporter.(*exportWriter).doTyp:+27golang.org/x/tools/internal/gcimporter.(*iexporter).typOff:+4golang.org/x/tools/internal/gcimporter.(*exportWriter).typ:+1golang.org/x/tools/internal/gcimporter.(*exportWriter).value:+1golang.org/x/tools/internal/gcimporter.(*iexporter).doDecl:+51golang.org/x/tools/internal/gcimporter.iexportCommon:+55golang.org/x/tools/internal/gcimporter.IExportShallow:+8
golang.org/x/tools/gopls@v0.18.1 go1.23.8 darwin/arm64 other,vscode (25)
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