cmd/compile: internal compiler error: bad live variable at entry: [6]string value
ALTree opened this issue · 3 comments
ALTree commented
$ gotip version
go version devel go1.17-14a18b7d25 Thu Apr 22 04:07:38 2021 +0000 windows/amd64
package p
func f() {
var s string
s = s + "" + s + "" + s + ""
for true {
}
}
$ gotip tool compile crash.go
crash.go:5:26: internal compiler error: bad live variable at entry of f: [6]string value
goroutine 20 [running]:
runtime/debug.Stack()
D:/users/f65362c/alberto/other/gotip/src/runtime/debug/stack.go:24 +0x65
cmd/compile/internal/base.FatalfAt(0xc0000a4a00, 0x95d039, 0x1, 0xc0003d38d0, 0x0, 0xc0000a9354)
D:/users/f65362c/alberto/other/gotip/src/cmd/compile/internal/base/print.go:227 +0x157
cmd/compile/internal/liveness.(*liveness).epilogue(0xc0000f62c0)
D:/users/f65362c/alberto/other/gotip/src/cmd/compile/internal/liveness/plive.go:838 +0xc39
cmd/compile/internal/liveness.Compute(0xc0000f62c0, 0xc0003591e0, 0x972918, 0x1)
D:/users/f65362c/alberto/other/gotip/src/cmd/compile/internal/liveness/plive.go:1353 +0x8f
cmd/compile/internal/ssagen.genssa(0xc0000f62c0, 0xc0003c4f50)
D:/users/f65362c/alberto/other/gotip/src/cmd/compile/internal/ssagen/ssa.go:6564 +0x9e
cmd/compile/internal/ssagen.Compile(0xc0000f62c0, 0x0)
D:/users/f65362c/alberto/other/gotip/src/cmd/compile/internal/ssagen/pgen.go:175 +0x266
cmd/compile/internal/gc.compileFunctions.func2.1()
D:/users/f65362c/alberto/other/gotip/src/cmd/compile/internal/gc/compile.go:130 +0x65
created by cmd/compile/internal/gc.compileFunctions.func2
D:/users/f65362c/alberto/other/gotip/src/cmd/compile/internal/gc/compile.go:128 +0xcf
Tentatively putting as relblocker in the 1.17 milestone since it's a tip regression, but feel free to re-label.
cc @randall77
cuonglm commented
Also cc @cherrymui @aclements @dr2chase, as this is on triggered with regabiargs
enabled:
GOEXPERIMENT=regabiargs GOARCH=amd64 go tool compile issue45693.go
Compile succeed with:
GOEXPERIMENT=noregabiargs GOARCH=amd64 go tool compile issue45693.go
cherrymui commented
Thanks. I'll take a look.
gopherbot commented
Change https://golang.org/cl/312670 mentions this issue: cmd/compile: keep call's args in elim dead auto pass