-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
lib,src: switch Buffer::kMaxLength to size_t #31406
Conversation
Change the type of `Buffer::kMaxLength` to size_t because upcoming changes in V8 will allow typed arrays > 2 GB on 64 bits platforms. Not all platforms handle file reads and writes > 2 GB though so keep enforcing the 2 GB typed array limit for I/O operations. Fixes: nodejs#31399 Refs: libuv/libuv#1501
This comment has been minimized.
This comment has been minimized.
I think you'll want to update this line as well: replace |
Good catch. Updated, thanks. |
This comment has been minimized.
This comment has been minimized.
Landed in 5005c3c |
Change the type of `Buffer::kMaxLength` to size_t because upcoming changes in V8 will allow typed arrays > 2 GB on 64 bits platforms. Not all platforms handle file reads and writes > 2 GB though so keep enforcing the 2 GB typed array limit for I/O operations. Fixes: #31399 Refs: libuv/libuv#1501 PR-URL: #31406 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Shelley Vohr <[email protected]>
Change the type of `Buffer::kMaxLength` to size_t because upcoming changes in V8 will allow typed arrays > 2 GB on 64 bits platforms. Not all platforms handle file reads and writes > 2 GB though so keep enforcing the 2 GB typed array limit for I/O operations. Fixes: #31399 Refs: libuv/libuv#1501 PR-URL: #31406 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Shelley Vohr <[email protected]>
@bnoordhuis is this a change that should go to |
@codebytere I've updated the labels. A back-port shouldn't be necessary unless v12.x updates to a new enough V8 version and this PR is technically a semver-major change. |
nodejs#31406 introduced a regression in `Hash`, `Hmac`, `SignBase`, and `PublicKeyCipher` Signed-off-by: James M Snell <[email protected]>
Change the type of
Buffer::kMaxLength
to size_t because upcomingchanges in V8 will allow typed arrays > 2 GB on 64 bits platforms.
Not all platforms handle file reads and writes > 2 GB though so keep
enforcing the 2 GB typed array limit for I/O operations.
Fixes: #31399
Refs: libuv/libuv#1501