-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: out of memory with large slice and map composite literals #22010
Comments
Both 1.9 and tip indeed seem to run out of memory. I have 7GB of free memory and it takes the build around 10s to use it all up, so it looks like it's stuck in an endless loop somewhere. Will try to investigate and get a smaller reproduction program. |
Nope - removing the 23k elements from the I think I saw issues about huge composite literals (especially really long slices and maps) using too much CPU time or memory. I wonder what could have caused the regression from 1.8. A bit beyond me, I'm afraid. |
Change https://golang.org/cl/66050 mentions this issue: |
CL 66050 reduces memory use from ~15GB to ~0.5GB. |
That is only 96% smaller. Why stop there? |
@ianlancetaylor Gotta leave some work for 1.11. |
This is now fixed on tip. Since this is a regression from 1.8 to 1.9, there's a possibility we could backport this fix (or another fix more directly related to the 1.8->1.9 regression, if we can understand it) to 1.9.1. But I'm leaning against doing this, it is a difficult bug to trigger (probably requires generated code) and can be worked around (doing the optimization in CL66050 manually). |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
go build finishes as go1.8.3.
What did you see instead?
The text was updated successfully, but these errors were encountered: