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
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ALTree
Copy link
Member

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 the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 4, 2021
@ALTree ALTree added this to the Go1.17 milestone May 4, 2021
@cherrymui
Copy link
Member

cc @thanm

Maybe we can change it to be best effort.

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

thanm commented May 4, 2021

I'll take a look.

@gopherbot
Copy link

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

@gopherbot
Copy link

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

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>
@golang golang locked and limited conversation to collaborators May 5, 2022
@rsc rsc unassigned thanm Jun 23, 2022
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.
Projects
None yet
Development

No branches or pull requests

4 participants