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: panic: internal error: can't locate after prolog value (with -N -l) #45948

Closed
ALTree opened this issue May 4, 2021 · 4 comments
Closed
Assignees
Milestone

Comments

@ALTree
Copy link
Member

@ALTree ALTree commented May 4, 2021

$ gotip version
go version devel go1.17-da7496d841 Tue May 4 17:37:39 2021 +0000 linux/amd64
package p

func f(p int) {
L:
	goto L

}
$ gotip tool compile -N -l crash.go

panic: internal error: f=f: can't locate after prolog value

goroutine 7 [running]:
cmd/compile/internal/ssa.BuildFuncDebugNoOptimized(0xc000172400, 0xc00037cea0, 0x0, 0xd1e2b8)
	/home/alberto/go/src/cmd/compile/internal/ssa/debug.go:1366 +0xf54
cmd/compile/internal/ssagen.genssa(0xc00037cea0, 0xc000402a80)
	/home/alberto/go/src/cmd/compile/internal/ssagen/ssa.go:6988 +0xc16
cmd/compile/internal/ssagen.Compile(0xc0001382c0, 0x0)
	/home/alberto/go/src/cmd/compile/internal/ssagen/pgen.go:175 +0x266
cmd/compile/internal/gc.compileFunctions.func2.1()
	/home/alberto/go/src/cmd/compile/internal/gc/compile.go:136 +0x65
created by cmd/compile/internal/gc.compileFunctions.func2
	/home/alberto/go/src/cmd/compile/internal/gc/compile.go:134 +0xcf

Doesn't crash on Go1.16.
Doesn't crash on GOEXPERIMENT=noregabiargs.

Reduced from a gosmith crasher.

cc @cherrymui @aclements @dr2chase

@ALTree ALTree added this to the Go1.17 milestone May 4, 2021
@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented May 4, 2021

cc @thanm

Maybe we can change it to be best effort.

Loading

@thanm thanm self-assigned this May 4, 2021
@thanm
Copy link
Contributor

@thanm thanm commented May 4, 2021

I'll take a look.

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented May 4, 2021

Change https://golang.org/cl/316752 mentions this issue: cmd/compile: handle degenerate entry blocks in -N debug gen

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented May 5, 2021

Change https://golang.org/cl/317089 mentions this issue: cmd/compile: debug trace output for -N variable location gen

Loading

@gopherbot gopherbot closed this in 66ce8aa May 5, 2021
gopherbot pushed a commit that referenced this issue May 5, 2021
Add some rudimentary debug trace output for -N location list
generation if "-d=ssa/locationlists" is set.

Updates #45948.

Change-Id: If1a95730538a6e7def7ebe1ece1a71da8e5f0975
Reviewed-on: https://go-review.googlesource.com/c/go/+/317089
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants