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
gccgo: crash due to running out of memory (likely) #7754
Milestone
Comments
This is an interesting one, because the spec doesn't permit any other result. We have implementation restrictions on the sizes of numeric values, but we don't have any on the sizes of string values. What should we say is the minimum length of the longest string that an implementation must permit? Status changed to Accepted. |
See also issue #7755. |
I think any limit is going to be problematic: If one limits the size of an individual string (say 1MB), one can simply create a lot of them (say 1000 1MB strings). A large limit may be a problem on small devices. A small limit may cause legitimate problems with some specialized codes. I don't think we should enshrine any specific limit; I would be happy if the compiler would not crash and instead report an "out of memory" error. (We have the same problem with large numeric constants, even though we have a limit). |
Just waiting until the compiler runs out of memory is also not good behaviour, because it means that the compiler eats up all of virtual memory, starving the machine. Or, you put an artificial limit on the amount of memory the compiler can use, but then you fail to compile large programs that could be compiled, and it's painful to portably adapt to machines with more available memory. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: