-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Int32 overflow when creating a buffer #12553
Comments
You may be running into these lines.
|
@cjihrig Was about to write the same thing, appears to be the problem. |
Thoughts on this? |
I'd personally be in favor of some input validation, but I'd like to know what @nodejs/streams thinks. |
I'm definitely +1 for input validation. That large value is really a bug, because you are essentially disabling backpressure, and you are exposing yourself to out-of-memory errors. |
Fixed in #12593. |
I noticed that there's an unhandled overflow error in
stream.Readable
in work earlier today; when large values are supplied ashighWaterMark
the value used by the created object wraps around to a negative number. This didn't cause us massive problems, but it is a little difficult to debug (given that most people won't read the contents of_readableState
)which outputs:
This should ideally throw an error, or support larger numeric values.
The text was updated successfully, but these errors were encountered: