node
node copied to clipboard
buffer: make `buflen` in integer range
make buflen within the integer range when buffer.toString() and writing a string to buffer(for example buffer.write(str))
Fixes: https://github.com/nodejs/node/issues/51817
CI: https://ci.nodejs.org/job/node-test-pull-request/57289/
CI: https://ci.nodejs.org/job/node-test-pull-request/57531/
this PR has been approved but hasn't been landed for a long time, could you please take a look? @legendecas
CI: https://ci.nodejs.org/job/node-test-pull-request/57967/
I find some test checks didn't pass, I believe that's because in the test file, the buffer with size > INT32_MAX on x32 platform which will throw range error, I have updated and skip the test file on x32 platform, could you take a look? @legendecas
This needs a rebase.
This needs a rebase.
Resolved. Thanks!
CI: https://ci.nodejs.org/job/node-test-pull-request/58481/
CI: https://ci.nodejs.org/job/node-test-pull-request/59447/
CI: https://ci.nodejs.org/job/node-test-pull-request/59540/
CI: https://ci.nodejs.org/job/node-test-pull-request/59560/
This will need a rebase again 😞
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.37%. Comparing base (
ba8fbf3) to head (e75ffe8). Report is 171 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #51821 +/- ##
==========================================
- Coverage 90.37% 90.37% -0.01%
==========================================
Files 629 629
Lines 184373 184385 +12
Branches 36022 36027 +5
==========================================
+ Hits 166624 166629 +5
- Misses 10906 10907 +1
- Partials 6843 6849 +6
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/string_bytes.cc | 69.64% <100.00%> (+1.21%) |
:arrow_up: |
🚀 New features to boost your workflow:
- ❄ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
CI: https://ci.nodejs.org/job/node-test-pull-request/63423/
CI: https://ci.nodejs.org/job/node-test-pull-request/65380/
CI: https://ci.nodejs.org/job/node-test-pull-request/65394/
Commit Queue failed
- Loading data for nodejs/node/pull/51821 ✔ Done loading data for nodejs/node/pull/51821 ----------------------------------- PR info ------------------------------------ Title buffer: make `buflen` in integer range (#51821) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch kylo5aby:buffer-utf8value -> nodejs:main Labels buffer, c++, semver-major, author ready, needs-ci Commits 1 - buffer: make `buflen` in integer range Committers 1 - Antoine du Hamel <[email protected]> PR-URL: https://github.com/nodejs/node/pull/51821 Fixes: https://github.com/nodejs/node/issues/51817 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/51821 Fixes: https://github.com/nodejs/node/issues/51817 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - buffer: make `buflen` in integer range ℹ This PR was created on Wed, 21 Feb 2024 09:45:39 GMT ✔ Approvals: 2 ✔ - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/51821#pullrequestreview-2080749937 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/51821#pullrequestreview-2281595354 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-02-23T16:54:25Z: https://ci.nodejs.org/job/node-test-pull-request/65394/ - Querying data for job/node-test-pull-request/65394/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/13856744953
Landed in 1ba47324e06d