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: runtime error: makeslice: len out of range #20779

Open
josharian opened this Issue Jun 24, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@josharian
Contributor

josharian commented Jun 24, 2017

package p

type S struct {
	i interface {
		f([10736000000000]int)
	}
}

compiling this results in:

$ go tool compile x.go
panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
cmd/compile/internal/gc.bvalloc(...)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/bv.go:21
cmd/compile/internal/gc.livenessemit(0xc4200b8480, 0xc420300328, 0xc420300390)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/plive.go:1254 +0x7c
cmd/compile/internal/gc.liveness(0xc4202f84e0, 0xc420322140, 0x0)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/plive.go:1302 +0x131
cmd/compile/internal/gc.genssa(0xc420322140, 0xc420086690)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/ssa.go:4379 +0x1352
cmd/compile/internal/gc.compileSSA(0xc42038a000, 0x0)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/pgen.go:242 +0x7e
cmd/compile/internal/gc.compile(0xc42038a000)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/pgen.go:219 +0x218
cmd/compile/internal/gc.funccompile(0xc42038a000)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/dcl.go:1049 +0xb7
cmd/compile/internal/gc.genwrapper(0xc4203178c0, 0xc4202f5200, 0xc4203207e0, 0x0)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/subr.go:1786 +0x73e
cmd/compile/internal/gc.imethods(0xc4203178c0, 0xc420324a10, 0x10102dc, 0xc42031c498)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/reflect.go:424 +0x318
cmd/compile/internal/gc.dtypesym(0xc4203178c0, 0xc4202efb60)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/reflect.go:1189 +0x13d5
cmd/compile/internal/gc.dtypesym(0xc420317800, 0xc4202efd00)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/reflect.go:1277 +0xe14
cmd/compile/internal/gc.dumpsignats()
	/Users/josh/go/tip/src/cmd/compile/internal/gc/reflect.go:1441 +0x3e7
cmd/compile/internal/gc.dumpobj1(0xc42001239c, 0x3, 0x3)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/obj.go:141 +0x2af
cmd/compile/internal/gc.dumpobj()
	/Users/josh/go/tip/src/cmd/compile/internal/gc/obj.go:51 +0x61
cmd/compile/internal/gc.Main(0x17756e8)
	/Users/josh/go/tip/src/cmd/compile/internal/gc/main.go:631 +0x24f7
main.main()
	/Users/josh/go/tip/src/cmd/compile/main.go:49 +0x89

Similar to #20529, although this also reproduces with 1.8. For code with a similar structure, see #20778.

Marking as unplanned, pending real code encountering this problem.

Found with go-fuzz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment