gotip run main.go
go build command-line-arguments: # command-line-arguments
./main.go:9:20: internal compiler error: 'fn': panic during generic deadcode while compiling fn:
runtime error: index out of range [1] with length 1
goroutine 9 [running]:
cmd/compile/internal/ssa.Compile.func1()
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/compile.go:49 +0x71
panic({0xd84160, 0xc00002eb28})
/home/olegbespalov/sdk/gotip/src/runtime/panic.go:884 +0x213
cmd/compile/internal/ssa.liveValues(0xc000442b60, {0xc000028bd0, 0x23, 0x1e?})
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/deadcode.go:145 +0x6a8
cmd/compile/internal/ssa.deadcode(0xc000442b60)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/deadcode.go:206 +0x1cc
cmd/compile/internal/ssa.Compile(0xc000442b60)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/compile.go:97 +0x963
cmd/compile/internal/ssagen.buildssa(0xc00042f900, 0x3)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssagen/ssa.go:572 +0x2027
cmd/compile/internal/ssagen.Compile(0xc00042f900, 0x0?)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssagen/pgen.go:185 +0x4c
cmd/compile/internal/gc.compileFunctions.func5.1(0xc000083980?)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/gc/compile.go:171 +0x3a
cmd/compile/internal/gc.compileFunctions.func3.1()
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/gc/compile.go:153 +0x32
created by cmd/compile/internal/gc.compileFunctions.func3
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/gc/compile.go:152 +0x245
goroutine 9 [running]:
runtime/debug.Stack()
/home/olegbespalov/sdk/gotip/src/runtime/debug/stack.go:24 +0x65
cmd/compile/internal/base.FatalfAt({0x46d7f0?, 0xc0?}, {0xc00002be00, 0x32}, {0xc0004599a0, 0x5, 0x5})
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/base/print.go:227 +0x1d7
cmd/compile/internal/base.Fatalf(...)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/base/print.go:196
cmd/compile/internal/ssagen.(*ssafn).Fatalf(0xc00046d828?, {0x6ac31e88?, 0x7f89?}, {0xde0d3c, 0x2c}, {0xc00044dc00, 0x4, 0x0?})
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssagen/ssa.go:7831 +0x177
cmd/compile/internal/ssa.(*Func).Fatalf(0xc000442b60, {0xde0d3c, 0x2c}, {0xc00044dc00, 0x4, 0x4})
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/func.go:719 +0x28b
cmd/compile/internal/ssa.Compile.func1()
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/compile.go:54 +0x1bc
panic({0xd84160, 0xc00002eb28})
/home/olegbespalov/sdk/gotip/src/runtime/panic.go:884 +0x213
cmd/compile/internal/ssa.liveValues(0xc000442b60, {0xc000028bd0, 0x23, 0x1e?})
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/deadcode.go:145 +0x6a8
cmd/compile/internal/ssa.deadcode(0xc000442b60)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/deadcode.go:206 +0x1cc
cmd/compile/internal/ssa.Compile(0xc000442b60)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssa/compile.go:97 +0x963
cmd/compile/internal/ssagen.buildssa(0xc00042f900, 0x3)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssagen/ssa.go:572 +0x2027
cmd/compile/internal/ssagen.Compile(0xc00042f900, 0x0?)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/ssagen/pgen.go:185 +0x4c
cmd/compile/internal/gc.compileFunctions.func5.1(0xc000083980?)
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/gc/compile.go:171 +0x3a
cmd/compile/internal/gc.compileFunctions.func3.1()
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/gc/compile.go:153 +0x32
created by cmd/compile/internal/gc.compileFunctions.func3
/home/olegbespalov/sdk/gotip/src/cmd/compile/internal/gc/compile.go:152 +0x245
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Not from my experience
What operating system and processor architecture are you using (
go env)?gotip envOutputWhat did you do?
Run
main.goWhat did you expect to see?
No panics.
What did you see instead?
A panic during generic deadcode.
panic during generic deadcodeWe saw it recently in our CI. The panicing code is from one of our dependencies.
I tried to
git bisect, and it showed me that this commit fd59c6c is the one where it started, but maybe I'm wrong here 🤷