Skip to content
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

go/types: infinite recursion in gopls via *TypeParam.Underlying #50803

Closed
virtuald opened this issue Jan 25, 2022 · 5 comments
Closed

go/types: infinite recursion in gopls via *TypeParam.Underlying #50803

virtuald opened this issue Jan 25, 2022 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@virtuald
Copy link

gopls version: v0.7.5
gopls flags:
update flags: proxy
extension version: 0.30.0
go version: 1.18beta1
environment: Visual Studio Code darwin
initialization error: undefined
issue timestamp: Tue, 25 Jan 2022 03:54:55 GMT
restart history:
Mon, 24 Jan 2022 22:46:20 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

Here's a complete file that I'm able to cause crashes in:

 package main
 
 import (
 	"fmt"
 )
 
 type CType[T any] []T
 
-func MakeIt[X any, C XT[CT], CT any](c any) {
+func MakeIt[X XT, C XT[CT], CT any](c any) {
 	fmt.Println("wtf", c)
 }
 
 func make() {
 	type MyC = CType[int]
 	c := MyC{1, 2}
 	MakeIt[int](c)
 }

 func main() {
 	make()
 }

I was editing the type parameters of MakeIt (specifically the X parameter) just seeing what kinds of things were and weren't possible to specify. Changing X any to X XT caused the crash to occur the first time (I think?). When I edit this standalone the stack trace below shows up, but VSCode doesn't tell me that gopls crashed.

Please attach the stack trace from the crash.

A window with the error message should have popped up in the lower half of your screen.
Please copy the stack trace and error messages from that window and paste it in this issue.

runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc02d000390 stack=[0xc02d000000, 0xc04d000000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x1981cee?, 0x204dd80?})
	/Users/username/sdk/go1.18beta1/src/runtime/panic.go:992 +0x71
runtime.newstack()
	/Users/username/sdk/go1.18beta1/src/runtime/stack.go:1101 +0x5cc
runtime.morestack()
	/Users/username/sdk/go1.18beta1/src/runtime/asm_amd64.s:547 +0x8b

goroutine 9247 [running]:
go/types.(*TypeParam).Underlying(0xc006becae0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:90 +0x37 fp=0xc02d0003a0 sp=0xc02d000398 pc=0x12a8a97
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d0003b8 sp=0xc02d0003a0 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000410 sp=0xc02d0003b8 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000428 sp=0xc02d000410 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000440 sp=0xc02d000428 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000498 sp=0xc02d000440 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d0004b0 sp=0xc02d000498 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d0004c8 sp=0xc02d0004b0 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000520 sp=0xc02d0004c8 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000538 sp=0xc02d000520 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000550 sp=0xc02d000538 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d0005a8 sp=0xc02d000550 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d0005c0 sp=0xc02d0005a8 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d0005d8 sp=0xc02d0005c0 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000630 sp=0xc02d0005d8 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000648 sp=0xc02d000630 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000660 sp=0xc02d000648 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d0006b8 sp=0xc02d000660 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d0006d0 sp=0xc02d0006b8 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d0006e8 sp=0xc02d0006d0 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000740 sp=0xc02d0006e8 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000758 sp=0xc02d000740 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000770 sp=0xc02d000758 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d0007c8 sp=0xc02d000770 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d0007e0 sp=0xc02d0007c8 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d0007f8 sp=0xc02d0007e0 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000850 sp=0xc02d0007f8 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000868 sp=0xc02d000850 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000880 sp=0xc02d000868 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d0008d8 sp=0xc02d000880 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d0008f0 sp=0xc02d0008d8 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000908 sp=0xc02d0008f0 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000960 sp=0xc02d000908 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000978 sp=0xc02d000960 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000990 sp=0xc02d000978 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d0009e8 sp=0xc02d000990 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000a00 sp=0xc02d0009e8 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000a18 sp=0xc02d000a00 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000a70 sp=0xc02d000a18 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000a88 sp=0xc02d000a70 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000aa0 sp=0xc02d000a88 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000af8 sp=0xc02d000aa0 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000b10 sp=0xc02d000af8 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000b28 sp=0xc02d000b10 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000b80 sp=0xc02d000b28 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000b98 sp=0xc02d000b80 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000bb0 sp=0xc02d000b98 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000c08 sp=0xc02d000bb0 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000c20 sp=0xc02d000c08 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000c38 sp=0xc02d000c20 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000c90 sp=0xc02d000c38 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000ca8 sp=0xc02d000c90 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000cc0 sp=0xc02d000ca8 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000d18 sp=0xc02d000cc0 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000d30 sp=0xc02d000d18 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000d48 sp=0xc02d000d30 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000da0 sp=0xc02d000d48 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000db8 sp=0xc02d000da0 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000dd0 sp=0xc02d000db8 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000e28 sp=0xc02d000dd0 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000e40 sp=0xc02d000e28 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000e58 sp=0xc02d000e40 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000eb0 sp=0xc02d000e58 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000ec8 sp=0xc02d000eb0 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000ee0 sp=0xc02d000ec8 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000f38 sp=0xc02d000ee0 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000f50 sp=0xc02d000f38 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000f68 sp=0xc02d000f50 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d000fc0 sp=0xc02d000f68 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d000fd8 sp=0xc02d000fc0 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d000ff0 sp=0xc02d000fd8 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d001048 sp=0xc02d000ff0 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d001060 sp=0xc02d001048 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d001078 sp=0xc02d001060 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d0010d0 sp=0xc02d001078 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d0010e8 sp=0xc02d0010d0 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d001100 sp=0xc02d0010e8 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d001158 sp=0xc02d001100 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d001170 sp=0xc02d001158 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d001188 sp=0xc02d001170 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d0011e0 sp=0xc02d001188 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d0011f8 sp=0xc02d0011e0 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d001210 sp=0xc02d0011f8 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d001268 sp=0xc02d001210 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d001280 sp=0xc02d001268 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d001298 sp=0xc02d001280 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d0012f0 sp=0xc02d001298 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d001308 sp=0xc02d0012f0 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d001320 sp=0xc02d001308 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d001378 sp=0xc02d001320 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d001390 sp=0xc02d001378 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d0013a8 sp=0xc02d001390 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d001400 sp=0xc02d0013a8 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d001418 sp=0xc02d001400 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d001430 sp=0xc02d001418 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d001488 sp=0xc02d001430 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d0014a0 sp=0xc02d001488 pc=0x12a8a79
go/types.under({0x1bcff70?, 0xc006becae0?})
	/Users/username/sdk/go1.18beta1/src/go/types/type.go:27 +0x58 fp=0xc02d0014b8 sp=0xc02d0014a0 pc=0x12a7ed8
go/types.(*TypeParam).iface(0xc006becae0)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:107 +0x37 fp=0xc02d001510 sp=0xc02d0014b8 pc=0x12a8b37
go/types.(*TypeParam).Underlying(0x0?)
	/Users/username/sdk/go1.18beta1/src/go/types/typeparam.go:91 +0x19 fp=0xc02d001528 sp=0xc02d001510 pc=0x12a8a79
...additional frames elided...
created by golang.org/x/tools/internal/memoize.(*Handle).run
	/Users/username/go/pkg/mod/golang.org/x/tools@v0.1.9-0.20220114220130-fd7798718afd/internal/memoize/memoize.go:320 +0x1b8

OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.

Working in a private repository, so no logs

@virtuald
Copy link
Author

Actually, just got a better version of this. Changing:

func MakeIt[X any, C XT[CT], CT any](c any) {

To:

func MakeIt[X XT, C XT[CT], CT any](c any) {

Then to

func MakeIt[XT x, C XT[CT], CT any](c any) {

Got me the gopls crashed error message.... ugh, it doesn't happen twice in a row though. Anyways, good luck.

@findleyr
Copy link
Contributor

Thank you very much for the report. Transferring to the Go issue tracker, since this relates to generics.

CC @griesemer

@findleyr findleyr changed the title Jan 25, 2022
@findleyr findleyr transferred this issue from golang/vscode-go Jan 25, 2022
@findleyr findleyr added this to the Go1.18 milestone Jan 25, 2022
@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 25, 2022
@griesemer
Copy link
Contributor

FWIW, I can't reproduce any of these crashes (for any of the code variants) in stand-alone type-checking of the code.

@findleyr
Copy link
Contributor

Reproed and confirmed that this is a dupe of https://go.dev/issue/50321. This is fixed at tip.

@virtuald
Copy link
Author

Thanks!

@golang golang locked and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants