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 arrays cause large binaries and toolchain errors #17378
Comments
I wonder how compiler behaves if allocate is inside main? |
Isn't this on purpose? The message was introduced in commit |
True Alberto. Although, does golint help identify the line number with the On Fri, Oct 7, 2016 at 9:52 AM, Alberto Donizetti notifications@github.com
|
It's not obvious to me that this issue is actionable. |
I encountered this issue too. |
I think I found the value where the first jump in the size of the executable occurs:
Hope this helps debug the problem. |
Hi, is there any updates? |
strangely, when I do below 2 things, above issue seems disappear my test code are as follow, from global zone, I defined a struct and an array like this, when I compile the golang project, the execuable is small (less than 2MB): |
And, when I use a one big dimentional array (size = 4096*4096), the execuable is still small, and my golang program runs fine on my debian server. |
On tip,
go version devel +0db9518 Fri Oct 7 03:46:50 2016 +0000 darwin/amd64
:Bumping 1<<30 to 1<<31 turns it into a linker error:
(Inspired by https://codegolf.stackexchange.com/questions/69189/build-a-compiler-bomb/69193#69193)
The text was updated successfully, but these errors were encountered: