-
Notifications
You must be signed in to change notification settings - Fork 18.1k
cmd/compile: autotmp_* variables make the compiler crash #17240
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
Comments
The test could also be removed; if you let it through, it causes a mystifying crash in the register allocator, so the only purpose of this check was to remove mystery. P(crash happening again) I think is relatively low, since we haven't to my knowledge run into this again since inserting the earlier check. |
Do we have to use "autotmp_" as the prefix for compiler-generated temporaries? Can we use some impossible prefix instead? E.g., "autotmp."? We could use something shorter, and it would probably reduce object file / DWARF info sizes. GCC uses ".L" for generated labels in assembly output. |
There are a few other cases of |
@randall77, I can't seem to reproduce the crash on tip 0e7f970 $ go run main.go && cat main.go
package main
func f(autotmp_foo int) int {
return autotmp_foo
}
func main() {
} I was looking at fixing all the |
Related / possible duplicate: #7923 |
Yes, my particular example seems to have fixed itself. |
I'm looking at using Than's abandoned change, for this and for #17644 |
CL https://golang.org/cl/32255 mentions this issue. |
CL https://golang.org/cl/32419 mentions this issue. |
The compiler fails with:
We should really keep track of which variables are autos with PAUTO, not with the name.
The text was updated successfully, but these errors were encountered: