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 when reporting invalid type alias declaration #48301

Closed
griesemer opened this issue Sep 9, 2021 · 2 comments
Closed

cmd/compile: crash when reporting invalid type alias declaration #48301

griesemer opened this issue Sep 9, 2021 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@griesemer
Copy link
Contributor

Compiling

package p

func _() {
	type T = T
}

using the old typechecker (-G=0) crashes when reporting an error:

$ go tool compile -G=0 /Users/gri/tmp/x.go
/Users/gri/tmp/x.go:4:7: invalid recursive type alias %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)
        /Users/gri/tmp/x.go:4:7: %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference) uses %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)
@griesemer griesemer added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 9, 2021
@griesemer griesemer added this to the Go1.18 milestone Sep 9, 2021
@griesemer griesemer self-assigned this Sep 9, 2021
@gopherbot
Copy link

Change https://golang.org/cl/348740 mentions this issue: cmd/compile: don't crash while reporting invalid alias cycle

@gopherbot
Copy link

Change https://golang.org/cl/348743 mentions this issue: cmd/compile: fix test case for unified IR (fix build)

gopherbot pushed a commit that referenced this issue Sep 9, 2021
For #48301.

Change-Id: Ie5f57dcce86773c06c5140abf13a6cfff79eb323
Reviewed-on: https://go-review.googlesource.com/c/go/+/348743
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
@golang golang locked and limited conversation to collaborators Jun 23, 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

2 participants