You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Various comments in the API of bytes.Buffer say that failure to allocate a buffer causes ErrTooLarge to be returned. I think they're all false, since they assume that the error caused by the call to make in makeSlice is a panic that can be recovered from using recover, when in fact it is a fatal error, at least in the gc implementation (though this behavior isn't prescribed by the spec).
I don't think the API as specified can be implemented without runtime magic and/or a spec change. We should probably strike all mention of ErrTooLarge but leave the variable there with a deprecation comment.
The text was updated successfully, but these errors were encountered:
Various comments in the API of bytes.Buffer say that failure to allocate a buffer causes ErrTooLarge to be returned. I think they're all false, since they assume that the error caused by the call to
make
inmakeSlice
is a panic that can be recovered from usingrecover
, when in fact it is a fatal error, at least in the gc implementation (though this behavior isn't prescribed by the spec).I don't think the API as specified can be implemented without runtime magic and/or a spec change. We should probably strike all mention of ErrTooLarge but leave the variable there with a deprecation comment.
The text was updated successfully, but these errors were encountered: