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: large literal causes stack overflow #8819
Comments
The following does not panic: func func1() {
// var a [100000000]int64 // also ok
a := [100000000]int64{}
a[1] = 1
} It seems the temporary on the right is only moved to the heap when it is zero-initialized. |
Too late for Go 1.5. |
This is probably out of my reach, but I'll write a few notes for the posterity. In both a := [100000000]int64{} and a := [100000000]int64{1} the compiler correctly marks The problem is that the for the latter the compiler generates an |
This issue (at least in the current form) was fixed by https://go-review.googlesource.com/#/c/22192 |
Thanks. |
The text was updated successfully, but these errors were encountered: