Buffer.concat
silently produces invalid output when its output size is greater than 4GiB
#55422
Labels
buffer
Issues and PRs related to the buffer subsystem.
confirmed-bug
Issues with confirmed bugs.
regression
Issues related to regressions.
Version
v22.9.0, v23.0.0
Platform
Subsystem
Buffer
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Consistent in
v22.9.0
andv23.0.0
What is the expected behavior? Why is that the expected behavior?
All bytes of the return buffer produced by
Buffer.concat([largeBuffer])
should be identical to the source:In this example:
What do you see instead?
In the returned buffer, first 5 bytes are
111
, and all following ones are 0.The
console.log(result)
output looks like:Additional information
No response
The text was updated successfully, but these errors were encountered: