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

cmd/compile: internal compiler error: autotmp_17 recorded as live on entry #26105

Closed
ALTree opened this issue Jun 28, 2018 · 6 comments
Closed
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

@ALTree
Copy link
Member

ALTree commented Jun 28, 2018

$ gotip version
go version devel +257d6c48e0 Thu Jun 28 03:12:01 2018 +0000 linux/amd64

The following program (reduced from a gosmith-generated one):

package p

var S interface{}

func F(n int) {
	f := 1
	fun := func(chan int) int {
		S = f
		return n
	}
	i := fun(([]chan int{})[n])

	var fc [2]chan int
	_ = <-(([...][2]chan int{fc})[i][i])
}

crashes the tip compiler with the following error:

$ gotip build crash.go 
# command-line-arguments
<autogenerated>:1: internal compiler error: internal error: F .autotmp_17 (type [1][2]chan int) recorded as live on entry

goroutine 8 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/home/alberto/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xcc628d, 0x2f, 0xc00053b968, 0x2, 0x2)
	/home/alberto/go/src/cmd/compile/internal/gc/subr.go:182 +0x1f7
cmd/compile/internal/gc.(*Liveness).epilogue(0xc0004e4160)
	/home/alberto/go/src/cmd/compile/internal/gc/plive.go:1159 +0x1642
cmd/compile/internal/gc.liveness(0xc0004dc000, 0xc0004e0000, 0x0, 0x0, 0x0)
	/home/alberto/go/src/cmd/compile/internal/gc/plive.go:1690 +0xc4
cmd/compile/internal/gc.genssa(0xc0004e0000, 0xc00050e150)
	/home/alberto/go/src/cmd/compile/internal/gc/ssa.go:4820 +0xbe
cmd/compile/internal/gc.compileSSA(0xc00035c000, 0x1)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:269 +0x1bc
cmd/compile/internal/gc.compileFunctions.func2(0xc00036b740, 0xc000016730, 0x1)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:323 +0x49
created by cmd/compile/internal/gc.compileFunctions
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:321 +0x11a

It compiles fine on go1.10.

@ALTree ALTree added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Jun 28, 2018
@ALTree ALTree added this to the Go1.11 milestone Jun 28, 2018
@ALTree
Copy link
Member Author

ALTree commented Jun 28, 2018

git bisect points to 5c40210 (cmd/compile: in prove, add transitive closure of relations) as the first bad commit.

cc @rasky @dr2chase @aclements

@dr2chase dr2chase self-assigned this Jun 28, 2018
@dr2chase
Copy link
Contributor

Glorious 🙄. Thanks, will look.

@gopherbot
Copy link

Change https://golang.org/cl/121436 mentions this issue: cmd/compile: make OpAddr depend on VarDef in storeOrder

@josharian josharian reopened this Jun 29, 2018
@josharian
Copy link
Contributor

Fix was reverted.

@gopherbot
Copy link

Change https://golang.org/cl/123015 mentions this issue: cmd/compile: add mem operand to OpAddr

@gopherbot
Copy link

Change https://golang.org/cl/122483 mentions this issue: cmd/compile: add LocalAddr that takes SP,mem operands

@golang golang locked and limited conversation to collaborators Jul 12, 2019
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

4 participants