node icon indicating copy to clipboard operation
node copied to clipboard

buffer: make `buflen` in integer range

Open kylo5aby opened this issue 1 year ago • 13 comments
trafficstars

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

kylo5aby avatar Feb 21 '24 09:02 kylo5aby

CI: https://ci.nodejs.org/job/node-test-pull-request/57289/

nodejs-github-bot avatar Feb 22 '24 06:02 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/57531/

nodejs-github-bot avatar Mar 01 '24 14:03 nodejs-github-bot

this PR has been approved but hasn't been landed for a long time, could you please take a look? @legendecas

kylo5aby avatar Mar 25 '24 07:03 kylo5aby

CI: https://ci.nodejs.org/job/node-test-pull-request/57967/

nodejs-github-bot avatar Mar 27 '24 06:03 nodejs-github-bot

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

kylo5aby avatar Mar 28 '24 11:03 kylo5aby

This needs a rebase.

legendecas avatar Apr 16 '24 22:04 legendecas

This needs a rebase.

Resolved. Thanks!

kylo5aby avatar Apr 17 '24 08:04 kylo5aby

CI: https://ci.nodejs.org/job/node-test-pull-request/58481/

nodejs-github-bot avatar Apr 17 '24 22:04 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/59447/

nodejs-github-bot avatar May 27 '24 11:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/59540/

nodejs-github-bot avatar May 30 '24 15:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/59560/

nodejs-github-bot avatar May 31 '24 10:05 nodejs-github-bot

This will need a rebase again 😞

jakecastelli avatar Aug 26 '24 00:08 jakecastelli

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:

... and 21 files with indirect coverage changes

🚀 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.

codecov[bot] avatar Aug 28 '24 09:08 codecov[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/63423/

nodejs-github-bot avatar Nov 04 '24 18:11 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/65380/

nodejs-github-bot avatar Feb 23 '25 00:02 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/65394/

nodejs-github-bot avatar Feb 23 '25 16:02 nodejs-github-bot

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/.ncu
https://github.com/nodejs/node/actions/runs/13856744953

nodejs-github-bot avatar Mar 14 '25 12:03 nodejs-github-bot

Landed in 1ba47324e06d

jasnell avatar Mar 14 '25 17:03 jasnell