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
builtin: documentation about make #7832
Labels
Comments
that's entirely different thing. you can recover from that case simply because there is a static check inside runtime for unreasonable len/caps. If the actual memory allocation fails, the program will crash. And I think that's implementation detail that shouldn't be exposed, as they are not reliable and only catches silly errors. If we want to document it, just say if make can't fulfill the request, it will panic, and it might or might not be recoverable. |
but as I said, that only catches very silly errors like allocating a slice that's bigger than the maximum heap size, and in that case, the user can easily check the argument himself. this kind of test is implementation detail, and I doubt we want to expose to the user. (Because it can change at any time, and other Go implementations might just blindly allocate the memory and crash, so the user can't even rely on this behavior if he wants to write portable Go.) |
See also issue #7871. By the way, it does not panic, it exits the program. Status changed to WontFix. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: