-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/go/ssa/builder.go: panic("nil underlyin") while executing *ssa.Program.Build() #68195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
the loaded package is "google.golang.org/protobuf/reflect/protoreflect" |
The version of x/tools v0.11.0 (from the stack trace) is fairly out of date so you may want to try updating to see if this fixes the issue already. I am not yet able to reproduce this with go1.20.5 (from the go env) with Here is what I am doing to try to reproduce this:
Can you give more details for how to reproduce the crash? |
thanks for replying. the problem was solved after I updated x/tools to version v0.22.0 |
solved by updating x/gools to the latest version |
Go version
go version go1.20.5 darwin/amd64
Output of
go env
in your module/workspace:What did you do?
here is my code
`
I load the packages of my project and about to build an ssa program for further analyzing
What did you see happen?
it panics when executing
prog.Build()
, the panic msg is "nil underlying", and below is the stackpanic: nil underlying
goroutine 10022 [running]: go/types.(*Named).under(0xc0077472d0) /usr/local/opt/go/libexec/src/go/types/named.go:494 +0x6e5 go/types.under({0x101742568, 0xc0077472d0}) /usr/local/opt/go/libexec/src/go/types/type.go:23 +0x8c go/types.computeInterfaceTypeSet(0x0, 0x0, 0xc007701220) /usr/local/opt/go/libexec/src/go/types/typeset.go:273 +0x7f3 go/types.(*Interface).typeSet(0xc007701220) /usr/local/opt/go/libexec/src/go/types/interface.go:29 +0x3d go/types.(*Interface).Complete(0xc007701220) /usr/local/opt/go/libexec/src/go/types/interface.go:143 +0x4c golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4c2d0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:304 +0x5ec golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4c2d0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc000349a40) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc000349a40}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000b74f00) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x101742658, 0xc0001a7de8}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).tuple(0xc0072878f0, 0xc0001a7de8) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:159 +0x4b golang.org/x/tools/go/ssa.(*subster).signature(0xc0072878f0, 0xc007762140) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:399 +0x105 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x1017425b8, 0xc007762140}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:132 +0xea8 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4c7d0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:268 +0x18e golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4c7d0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc000349960) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc000349960}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000b7f860) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x101742658, 0xc000410b28}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).tuple(0xc0072878f0, 0xc000410b28) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:159 +0x4b golang.org/x/tools/go/ssa.(*subster).signature(0xc0072878f0, 0xc007762000) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:398 +0xd2 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x1017425b8, 0xc007762000}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:132 +0xea8 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4cbe0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:268 +0x18e golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4cbe0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc0003498f0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc0003498f0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000a98240) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x101742658, 0xc000411740}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).tuple(0xc0072878f0, 0xc000411740) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:159 +0x4b golang.org/x/tools/go/ssa.(*subster).signature(0xc0072878f0, 0xc007741fc0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:399 +0x105 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x1017425b8, 0xc007741fc0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:132 +0xea8 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4cc80) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:268 +0x18e golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4cc80}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc000349880) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc000349880}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000a98420) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x101742658, 0xc000411788}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).tuple(0xc0072878f0, 0xc000411788) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:159 +0x4b golang.org/x/tools/go/ssa.(*subster).signature(0xc0072878f0, 0xc007741f80) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:399 +0x105 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x1017425b8, 0xc007741f80}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:132 +0xea8 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4da40) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:268 +0x18e golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4da40}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc0003497a0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc0003497a0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4dbd0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:286 +0x414 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4dbd0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc000349730) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc000349730}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000cdc6c0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x101742658, 0xc0006ae948}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).tuple(0xc0072878f0, 0xc0006ae948) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:159 +0x4b golang.org/x/tools/go/ssa.(*subster).signature(0xc0072878f0, 0xc007741d00) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:399 +0x105 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x1017425b8, 0xc007741d00}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:132 +0xea8 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4dc70) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:268 +0x18e golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4dc70}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc0003496c0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc0003496c0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000cdcf00) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x101742658, 0xc0006aea08}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).tuple(0xc0072878f0, 0xc0006aea08) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:159 +0x4b golang.org/x/tools/go/ssa.(*subster).signature(0xc0072878f0, 0xc007741cc0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:399 +0x105 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x1017425b8, 0xc007741cc0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:132 +0xea8 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4de00) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:268 +0x18e golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4de00}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc000349260) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc000349260}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000cdd920) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x101742658, 0xc0006aeab0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).tuple(0xc0072878f0, 0xc0006aeab0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:159 +0x4b golang.org/x/tools/go/ssa.(*subster).signature(0xc0072878f0, 0xc007741680) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:399 +0x105 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x1017425b8, 0xc007741680}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:132 +0xea8 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000b4dea0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:268 +0x18e golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000b4dea0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc000349110) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc000349110}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000cddf20) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x101742658, 0xc0006aeb58}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).tuple(0xc0072878f0, 0xc0006aeb58) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:159 +0x4b golang.org/x/tools/go/ssa.(*subster).signature(0xc0072878f0, 0xc007741640) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:399 +0x105 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x1017425b8, 0xc007741640}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:132 +0xea8 golang.org/x/tools/go/ssa.(*subster).interface_(0xc0072878f0, 0xc000cee320) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:268 +0x18e golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742518, 0xc000cee320}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:138 +0x1012 golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc0003490a0) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc0003490a0}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000d05320) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x1017433a0, 0xc0000c4750}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).struct_(0xc0072878f0, 0xc0000c4750) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:181 +0x79 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742608, 0xc0000c4750}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:115 +0x9eb golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc000349030) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc000349030}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742590, 0xc000f5c750}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:106 +0x7c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000f98a20) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 golang.org/x/tools/go/ssa.(*subster).varlist(0xc0072878f0, {0x1017433a0, 0xc0000c4840}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:197 +0xcf golang.org/x/tools/go/ssa.(*subster).struct_(0xc0072878f0, 0xc0000c4840) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:181 +0x79 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742608, 0xc0000c4840}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:115 +0x9eb golang.org/x/tools/go/ssa.(*subster).named(0xc0072878f0, 0xc000348e70) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:344 +0x2c5 golang.org/x/tools/go/ssa.(*subster).typ(0xc0072878f0, {0x101742568, 0xc000348e70}) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:141 +0x10c5 golang.org/x/tools/go/ssa.(*subster).var_(0xc0072878f0, 0xc000f98a80) /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/subst.go:213 +0x92 created by golang.org/x/tools/go/ssa.(*Program).Build /Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2439 +0x1c5
What did you expect to see?
the code runs successfully
The text was updated successfully, but these errors were encountered: