-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Open
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.regressionIssues related to regressions.Issues related to regressions.
Description
Version
v22.9.0, v23.0.0
Platform
Windows 11 x64
Microsoft Windows NT 10.0.22631.0 x64
Subsystem
Buffer
What steps will reproduce the bug?
const largeBuffer = Buffer.alloc(2 ** 32 + 5)
largeBuffer.fill(111)
const result = Buffer.concat([largeBuffer])
console.log(result)
How often does it reproduce? Is there a required condition?
Consistent in v22.9.0
and v23.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:
111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, ....
What do you see instead?
In the returned buffer, first 5 bytes are 111
, and all following ones are 0.
111, 111, 111, 111, 111, 0, 0, 0, 0, 0, 0, ....
The console.log(result)
output looks like:
<Buffer 6f 6f 6f 6f 6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... 4294967251
more bytes>
Additional information
No response
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.regressionIssues related to regressions.Issues related to regressions.