golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.89k stars 17.65k forks source link

x/tools/go/ssa: TestTypeparamTest failing with go1.19 #60312

Closed adonovan closed 1 year ago

adonovan commented 1 year ago
xtools$ go1.19 test ./go/ssa -run=TestTypeparamTest
panic: variadic parameter must be of unnamed slice type

goroutine 232 [running]:
go/types.NewSignatureType(0x0, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, 0x14000690948, 0x140006905e8, 0x1)
    /Users/adonovan/sdk/go1.19/src/go/types/signature.go:53 +0x2a0
golang.org/x/tools/internal/typeparams.NewSignatureType(...)
    /Users/adonovan/w/xtools/internal/typeparams/typeparams_go118.go:55
golang.org/x/tools/go/ssa.(*subster).signature(0x104c665e0?, 0x14000169440)
    /Users/adonovan/w/xtools/go/ssa/subst.go:401 +0xd8
golang.org/x/tools/go/ssa.(*subster).typ(0x14000142de0, {0x104cbfc30?, 0x14000169440?})
    /Users/adonovan/w/xtools/go/ssa/subst.go:132 +0x540
golang.org/x/tools/go/ssa.(*Function).typ(...)
    /Users/adonovan/w/xtools/go/ssa/func.go:43
golang.org/x/tools/go/ssa.(*Function).typeOf(0x14000151200, {0x104cc05f0, 0x1400017c020})
    /Users/adonovan/w/xtools/go/ssa/func.go:36 +0x50
golang.org/x/tools/go/ssa.(*Function).instanceType(0x14000151200, 0x1400017c020)
    /Users/adonovan/w/xtools/go/ssa/func.go:52 +0x70
golang.org/x/tools/go/ssa.(*builder).expr0(0x14000427dd0, 0x14000151200, {0x104cc05f0?, 0x1400017c020?}, {0x2, {0x104cbfc30, 0x14000169440}, {0x0, 0x0}})
    /Users/adonovan/w/xtools/go/ssa/builder.go:791 +0x1b20
golang.org/x/tools/go/ssa.(*builder).expr(0x14000427198?, 0x14000151200, {0x104cc05f0?, 0x1400017c020?})
    /Users/adonovan/w/xtools/go/ssa/builder.go:623 +0x12c
golang.org/x/tools/go/ssa.(*builder).setCallFunc(0x104fc85b8?, 0x80?, 0x140004be000?, 0x1400014d440)
    /Users/adonovan/w/xtools/go/ssa/builder.go:1040 +0x2f4
golang.org/x/tools/go/ssa.(*builder).setCall(0x14000142de0?, 0x14000151200?, 0x14000168d80, 0x1400014d440)
    /Users/adonovan/w/xtools/go/ssa/builder.go:1119 +0x2c
golang.org/x/tools/go/ssa.(*builder).expr0(0x14000427dd0, 0x14000151200, {0x104cc02f0?, 0x14000168d80?}, {0x7, {0x104cbfc58, 0x140001ae840}, {0x0, 0x0}})
    /Users/adonovan/w/xtools/go/ssa/builder.go:702 +0x209c
golang.org/x/tools/go/ssa.(*builder).expr(0x14000170fc0?, 0x14000151200, {0x104cc02f0?, 0x14000168d80?})
    /Users/adonovan/w/xtools/go/ssa/builder.go:623 +0x12c
golang.org/x/tools/go/ssa.(*builder).assign(0x14000427658?, 0x14000151200?, {0x104cc1130?, 0x140001431d0}, {0x104cc02f0?, 0x14000168d80?}, 0x0?, 0x140004276b0)
    /Users/adonovan/w/xtools/go/ssa/builder.go:596 +0x2fc
golang.org/x/tools/go/ssa.(*builder).assignStmt(0xec1a3bc95d218727?, 0x14000151200, {0x140001ae580, 0x1, 0x14000170fc3?}, {0x140001ae5a0, 0x1, 0x0?}, 0x0)
    /Users/adonovan/w/xtools/go/ssa/builder.go:1204 +0x1bc
golang.org/x/tools/go/ssa.(*builder).stmt(0x14000427918?, 0x14000151200, {0x104cc0170?, 0x14000168dc0?})
    /Users/adonovan/w/xtools/go/ssa/builder.go:2160 +0xd94
golang.org/x/tools/go/ssa.(*builder).stmtList(0x140004be000?, 0x104cc2580?, {0x140001ae5b0?, 0x1, 0x14000427948?})
    /Users/adonovan/w/xtools/go/ssa/builder.go:944 +0x68
golang.org/x/tools/go/ssa.(*builder).stmt(0x14000151200?, 0x14000151200, {0x104cc0290?, 0x1400016ba10?})
    /Users/adonovan/w/xtools/go/ssa/builder.go:2256 +0xd34
golang.org/x/tools/go/ssa.(*builder).buildFunctionBody(0x14000150d80?, 0x14000151200)
    /Users/adonovan/w/xtools/go/ssa/builder.go:2370 +0x3c0
golang.org/x/tools/go/ssa.(*builder).buildFunction(0x104b38a10?, 0x14000151200)
    /Users/adonovan/w/xtools/go/ssa/builder.go:2305 +0x30
golang.org/x/tools/go/ssa.(*builder).buildCreated(0x14000427dd0)
    /Users/adonovan/w/xtools/go/ssa/builder.go:2392 +0x28
golang.org/x/tools/go/ssa.(*Package).build(0x1400014cf00)
    /Users/adonovan/w/xtools/go/ssa/builder.go:2585 +0xaec
sync.(*Once).doSlow(0x1400030b070?, 0x104b1bfd0?)
    /Users/adonovan/sdk/go1.19/src/sync/once.go:74 +0x104
sync.(*Once).Do(...)
    /Users/adonovan/sdk/go1.19/src/sync/once.go:65
golang.org/x/tools/go/ssa.(*Package).Build(...)
    /Users/adonovan/w/xtools/go/ssa/builder.go:2456
golang.org/x/tools/go/ssa.(*Program).Build.func1(0x38?)
    /Users/adonovan/w/xtools/go/ssa/builder.go:2441 +0x54
created by golang.org/x/tools/go/ssa.(*Program).Build
    /Users/adonovan/w/xtools/go/ssa/builder.go:2440 +0x180
FAIL    golang.org/x/tools/go/ssa   0.162s
bcmills commented 1 year ago

I don't see any such failures on the dashboard. Try go1.19.9 (the latest patch release) instead?

bcmills commented 1 year ago

Looks like that was #54946.

bcmills commented 1 year ago

Duplicate of #54946

adonovan commented 1 year ago

I had vaguely assumed the dl tool would give me the latest minor release of go1.19 including any backported fixes. Sorry for the noise.

bcmills commented 1 year ago

That is a significant motivating factor behind #57631. 🙃