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: crash on an unusual program #52278

Closed
go101 opened this issue Apr 11, 2022 · 4 comments
Closed

cmd/compile: crash on an unusual program #52278

go101 opened this issue Apr 11, 2022 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@go101
Copy link

go101 commented Apr 11, 2022

What version of Go are you using (go version)?

$ go version
go version go1.18 linux/amd64

What did you do?

package main

func main() {
	_:
	_: // internal compiler error: label missing tag
}

What did you expect to see?

Compiles okay.

What did you see instead?

Fails to compile.

# command-line-arguments
./main.go:5:3: internal compiler error: label missing tag

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 11, 2022
@dmitshur dmitshur added this to the Backlog milestone Apr 11, 2022
@dmitshur
Copy link
Contributor

CC @golang/runtime.

@nimelehin
Copy link
Contributor

Seems, the current implementation removes labels after processing them in func (e *escape) stmt(n ir.Node), so the 2nd blank label could not be found.

@gopherbot
Copy link

Change https://go.dev/cl/399574 mentions this issue: cmd/compile: fix compilation crash with several blank labels

@dmitshur dmitshur modified the milestones: Backlog, Go1.19 Apr 12, 2022
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 12, 2022
@gopherbot
Copy link

Change https://go.dev/cl/419318 mentions this issue: cmd/compile: fix blank label code

gopherbot pushed a commit that referenced this issue Jul 25, 2022
When checkEnabled is forced true, the 52278 test fails. Be a bit
more careful about processing blank labels.

Update #52278

Change-Id: I48aa89e2c9e3715d8efe599bc4363b5b5879d8a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/419318
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
jproberts pushed a commit to jproberts/go that referenced this issue Aug 10, 2022
When checkEnabled is forced true, the 52278 test fails. Be a bit
more careful about processing blank labels.

Update golang#52278

Change-Id: I48aa89e2c9e3715d8efe599bc4363b5b5879d8a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/419318
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: David Chase <drchase@google.com>
@golang golang locked and limited conversation to collaborators Jul 24, 2023
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

4 participants