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 in KeepAlive #17710

Closed
dsnet opened this issue Oct 31, 2016 · 1 comment
Closed

cmd/compile: internal compiler error in KeepAlive #17710

dsnet opened this issue Oct 31, 2016 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dsnet
Copy link
Member

dsnet commented Oct 31, 2016

ca4089a (issue: #15843, CL: http://golang.org/cl/28310) causes an internal when KeepAlive is applied on an interface.

Minimal reproduction:

package foo

import "runtime"

func f(x interface{}) {
	runtime.KeepAlive(x)
}

Prints (on amd64 on Linux Mint 17.1):

./foo.go:6: internal compiler error: KeepAlive with non-zero offset spill location x:8

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/home/rawr/Projects/go/src/runtime/debug/stack.go:24 +0x79
cmd/compile/internal/gc.Fatalf(0xa69a7e, 0x33, 0xc4203d4740, 0x2, 0x2)
	/home/rawr/Projects/go/src/cmd/compile/internal/gc/subr.go:165 +0x226
cmd/compile/internal/gc.(*ssaExport).Fatalf(0xd4f935, 0x6, 0xa69a7e, 0x33, 0xc4203d4740, 0x2, 0x2)
	/home/rawr/Projects/go/src/cmd/compile/internal/gc/ssa.go:4614 +0x5d
cmd/compile/internal/ssa.(*Config).Fatalf(0xc4203e4000, 0xc400000006, 0xa69a7e, 0x33, 0xc4203d4740, 0x2, 0x2)
	/home/rawr/Projects/go/src/cmd/compile/internal/ssa/config.go:319 +0x6e
cmd/compile/internal/ssa.(*Value).Fatalf(0xc4203e43c0, 0xa69a7e, 0x33, 0xc4203d4740, 0x2, 0x2)
	/home/rawr/Projects/go/src/cmd/compile/internal/ssa/value.go:235 +0x6f
cmd/compile/internal/gc.KeepAlive(0xc4203e43c0)
	/home/rawr/Projects/go/src/cmd/compile/internal/gc/ssa.go:4372 +0x18e
cmd/compile/internal/amd64.ssaGenValue(0xc4203abf40, 0xc4203e43c0)
	/home/rawr/Projects/go/src/cmd/compile/internal/amd64/ssa.go:864 +0x5c04
cmd/compile/internal/gc.genssa(0xc4203da240, 0xc4200ac238, 0xc4203dc930, 0xc4203dc9a0)
	/home/rawr/Projects/go/src/cmd/compile/internal/gc/ssa.go:4075 +0x25e
cmd/compile/internal/gc.compile(0xc4203d6750)
	/home/rawr/Projects/go/src/cmd/compile/internal/gc/pgen.go:433 +0x6e3
cmd/compile/internal/gc.funccompile(0xc4203d6750)
	/home/rawr/Projects/go/src/cmd/compile/internal/gc/dcl.go:1292 +0xdc
cmd/compile/internal/gc.Main()
	/home/rawr/Projects/go/src/cmd/compile/internal/gc/main.go:469 +0x202c
main.main()
	/home/rawr/Projects/go/src/cmd/compile/main.go:47 +0x15d

\cc @randall77 @dr2chase

@dsnet dsnet added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 31, 2016
@dsnet dsnet added this to the Go1.8 milestone Oct 31, 2016
@gopherbot
Copy link

CL https://golang.org/cl/32477 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants