Open
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/crash
runtime.gopanic:+69
golang.org/x/tools/internal/gcimporter.iexportCommon.func1:+7
runtime.gopanic:+50
runtime.panicmem:=262
runtime.sigpanic:+19
go/types.(*Package).Path:=34
golang.org/x/tools/internal/gcimporter.(*exportWriter).exportPath:=688
golang.org/x/tools/internal/gcimporter.(*exportWriter).pkg:+4
golang.org/x/tools/internal/gcimporter.(*exportWriter).doTyp:+119
golang.org/x/tools/internal/gcimporter.(*iexporter).typOff:+4
golang.org/x/tools/internal/gcimporter.(*exportWriter).typ:+1
golang.org/x/tools/internal/gcimporter.(*exportWriter).typeList:+3
golang.org/x/tools/internal/gcimporter.(*exportWriter).doTyp:+27
golang.org/x/tools/internal/gcimporter.(*iexporter).typOff:+4
golang.org/x/tools/internal/gcimporter.(*exportWriter).typ:+1
golang.org/x/tools/internal/gcimporter.(*exportWriter).value:+1
golang.org/x/tools/internal/gcimporter.(*iexporter).doDecl:+51
golang.org/x/tools/internal/gcimporter.iexportCommon:+55
golang.org/x/tools/internal/gcimporter.IExportShallow:+8
golang.org/x/tools/gopls@v0.18.1 go1.23.8 darwin/arm64 other,vscode (25)