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
Assignees
Labels
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Sep 9, 2021

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 this to the Go1.18 milestone Sep 9, 2021
@griesemer griesemer self-assigned this Sep 9, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 9, 2021

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

Loading

@gopherbot gopherbot closed this in 1a708bc Sep 9, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 9, 2021

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

Loading

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants