-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
go/types: accepts weird invalid program #20770
Comments
@ianlancetaylor I'd be curious to know what gccgo does with this snowflake. |
gccgo output:
|
gccgo definitely wins the compiler shootout on this one. :) |
go/types cycle detection has several issues. It's time to rethink/overhaul the mechanism. |
leads to usable error message. Need to investigate further to see if that is the right approach. (cycle detection in go/types could use a fundamental overhaul). |
|
Change https://golang.org/cl/116815 mentions this issue: |
This change improves upon cycle detection by taking into account cycles involving constants, variables, _and_ types. All new code (except for the additional tests) is guarded by the useCycleMarking (internal) flag and thus can be disabled on short notice if it introduced new problems. (The intent is to remove this flag shortly after 1.11 is released.) The test suite has been extended with various additional (and mostly esoteric) test cases which now correctly report cycles. A handful of existing test cases now report additional errors, but those are mostly esoteric cases. Overall, this is an improvement over the status quo. Fixes #8699. For #20770. Change-Id: I6086719acd0d5200edca4a3dbe703d053496af31 Reviewed-on: https://go-review.googlesource.com/116815 Run-TryBot: Robert Griesemer <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
The cmd/compile error message is pretty ugly, but I'll file a separate issue for that.
Marking as unplanned, because of the oddity and unlikeliness of the program.
Found with go-fuzz.
The text was updated successfully, but these errors were encountered: