Skip to content
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

buffer: make buflen in integer range #51821

Closed
wants to merge 1 commit into from

Conversation

kylo5aby
Copy link
Contributor

@kylo5aby kylo5aby commented Feb 21, 2024

make buflen within the integer range when buffer.toString() and writing a string to buffer(for example buffer.write(str))

Fixes: #51817

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Feb 21, 2024
@kylo5aby kylo5aby force-pushed the buffer-utf8value branch 3 times, most recently from 3833a0f to d51e680 Compare February 22, 2024 05:06
Comment on lines 727 to 728
if (max_length > static_cast<size_t>(v8::String::kMaxLength))
ThrowErrStringTooLong(env->isolate());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (max_length > static_cast<size_t>(v8::String::kMaxLength))
ThrowErrStringTooLong(env->isolate());
if (max_length > static_cast<size_t>(v8::String::kMaxLength)) {
ThrowErrStringTooLong(env->isolate());
return;
}

You're missing a return here; the Throw* functions don't actually return, you have to do it manually.

Comment on lines 1158 to 1173
// Invalid length of Buffer.utf8Write
{
const ubuf = Buffer.allocUnsafeSlow(2 ** 32);
assert.throws(() => {
ubuf.utf8Write('a', 2, kStringMaxLength + 2);
}, stringTooLongError);
}

// Invalid length of Buffer.write
{
const ubuf = Buffer.allocUnsafeSlow(2 ** 32);
assert.throws(() => {
ubuf.write('a', 2, kStringMaxLength + 2);
}, stringTooLongError);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test probably won't work in test/parallel, since 2 GiB is a lot to allocate (maybe it'll work on Linux)? It might work to put it in test/sequential instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @kvakil

Copy link
Member

@joyeecheung joyeecheung Feb 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For tests that require a lot of resource, we typically use test/pummel. You could also catch ERR_MEMORY_ALLOCATION_FAILED in the buffer creation and common.skip() in the test if the memory could not be allocated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks your suggestion @joyeecheung , I have update it, add a method in StringBytes to ensure that the capacity of buffer remains within the integer range when operating with string

@kvakil kvakil added semver-major PRs that contain breaking changes and should be released in the next major version. request-ci Add this label to start a Jenkins CI on a PR. labels Feb 22, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 22, 2024
@nodejs-github-bot

This comment was marked as outdated.

@kylo5aby kylo5aby changed the title buffer: fix Buffer.utf8Write fails when length exceeds integer range buffer: make ·buflen` in integer range Feb 22, 2024
@kylo5aby kylo5aby changed the title buffer: make ·buflen` in integer range buffer: make buflen in integer range Feb 22, 2024
@kylo5aby kylo5aby force-pushed the buffer-utf8value branch 3 times, most recently from 250acee to 2e93994 Compare February 23, 2024 05:48
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 1, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 1, 2024
@nodejs-github-bot

This comment was marked as outdated.

@kylo5aby
Copy link
Contributor Author

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

@kylo5aby kylo5aby force-pushed the buffer-utf8value branch 2 times, most recently from 5b60d83 to 69cee50 Compare March 27, 2024 02:29
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 27, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 27, 2024
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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%) ⬆️

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

@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 4, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 4, 2024
@nodejs-github-bot

This comment was marked as outdated.

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Feb 23, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 23, 2025
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 14, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Mar 14, 2025
@nodejs-github-bot
Copy link
Collaborator

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 <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51821
Fixes: https://github.com/nodejs/node/issues/51817
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/51821
Fixes: https://github.com/nodejs/node/issues/51817
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
--------------------------------------------------------------------------------
   ⚠  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

jasnell pushed a commit that referenced this pull request Mar 14, 2025
PR-URL: #51821
Fixes: #51817
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Mar 14, 2025

Landed in 1ba4732

@jasnell jasnell closed this Mar 14, 2025
RafaelGSS added a commit that referenced this pull request Mar 24, 2025
Semver-Major Commits:

buffer:
  * (SEMVER-MAJOR) make `buflen` in integer range (zhenweijin) #51821
build:
  * (SEMVER-MAJOR) bump supported macOS version to 13.5 (Michaël Zasso) #57115
  * (SEMVER-MAJOR) increase minimum Xcode version to 16.1 (Michaël Zasso) #56824
  * (SEMVER-MAJOR) link V8 with atomic library (Michaël Zasso) #55014
  * (SEMVER-MAJOR) remove support for ppc 32-bit (Michaël Zasso) #55014
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #55014
child_process:
  * (SEMVER-MAJOR) deprecate passing `args` to `spawn` and `execFile` (Daniel Venable) #57199
deps:
  * (SEMVER-MAJOR) V8: cherry-pick f915fa4c9f41 (Olivier Flückiger) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0d5d6e71bbb0 (Yagiz Nizipli) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0c11feeeca4a (Michaël Zasso) #55014
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #55014
  * (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #55014
  * (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) update V8 to 13.0.245.25 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) upgrade npm to 11.0.0 (npm team) #56274
  * (SEMVER-MAJOR) update undici to 7.0.0 (Node.js GitHub Bot) #56070
fs:
  * (SEMVER-MAJOR) remove ability to call truncate with fd (Yagiz Nizipli) #57567
  * (SEMVER-MAJOR) remove `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #55862
  * (SEMVER-MAJOR) deprecate passing invalid types in `fs.existsSync` (Carlos Espa) #55753
  * (SEMVER-MAJOR) runtime deprecate `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #49686
  * (SEMVER-MAJOR) remove `dirent.path` (Antoine du Hamel) #55548
lib:
  * (SEMVER-MAJOR) remove obsolete Cipher export (James M Snell) #57266
  * (SEMVER-MAJOR) unexpose six process bindings (Michaël Zasso) #57149
  * (SEMVER-MAJOR) make ALS default to AsyncContextFrame (Stephen Belanger) #55552
  * (SEMVER-MAJOR) runtime deprecate SlowBuffer (Rafael Gonzaga) #55175
net:
  * (SEMVER-MAJOR) make _setSimultaneousAccepts() end-of-life deprecated (Yagiz Nizipli) #57550
repl:
  * (SEMVER-MAJOR) runtime deprecate instantiating without new (Aviv Keller) #54869
src:
  * (SEMVER-MAJOR) update GetForegroundTaskRunner override (Etienne Pierre-doray) #55014
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 134 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) drop --experimental-permission in favour of --permission (Rafael Gonzaga) #56240
  * (SEMVER-MAJOR) add async context frame to AsyncResource (Gerhard Stöbich) #56082
  * (SEMVER-MAJOR) nuke deprecated and un-used enum members in `OptionEnvvarSettings` (Juan José) #53079
stream:
  * (SEMVER-MAJOR) catch and forward error from dest.write (jakecastelli) #55270
test:
  * (SEMVER-MAJOR) disable fast API call count checks (Michaël Zasso) #55014
test_runner:
  * (SEMVER-MAJOR) remove promises returned by t.test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) remove promises returned by test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) automatically wait for subtests to finish (Colin Ihrig) #56664
timers:
  * (SEMVER-MAJOR) check for immediate instance in clearImmediate (Gürgün Dayıoğlu) #57069
  * (SEMVER-MAJOR) set several methods EOL (Yagiz Nizipli) #56966
tls:
  * (SEMVER-MAJOR) remove deprecated tls.createSecurePair (Jonas) #57361
  * (SEMVER-MAJOR) make server.prototype.setOptions end-of-life (Yagiz Nizipli) #57339
tools:
  * (SEMVER-MAJOR) update V8 gypfiles for 13.0 (Michaël Zasso) #55014
url:
  * (SEMVER-MAJOR) expose urlpattern as global (Jonas) #56950
  * (SEMVER-MAJOR) runtime deprecate url.parse (Yagiz Nizipli) #55017
zlib:
  * (SEMVER-MAJOR) deprecate classes usage without `new` (Yagiz Nizipli) #55718

PR-URL: TBD
RafaelGSS added a commit that referenced this pull request Mar 24, 2025
Semver-Major Commits:

buffer:
  * (SEMVER-MAJOR) make `buflen` in integer range (zhenweijin) #51821
build:
  * (SEMVER-MAJOR) bump supported macOS version to 13.5 (Michaël Zasso) #57115
  * (SEMVER-MAJOR) increase minimum Xcode version to 16.1 (Michaël Zasso) #56824
  * (SEMVER-MAJOR) link V8 with atomic library (Michaël Zasso) #55014
  * (SEMVER-MAJOR) remove support for ppc 32-bit (Michaël Zasso) #55014
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #55014
child_process:
  * (SEMVER-MAJOR) deprecate passing `args` to `spawn` and `execFile` (Daniel Venable) #57199
deps:
  * (SEMVER-MAJOR) V8: cherry-pick f915fa4c9f41 (Olivier Flückiger) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0d5d6e71bbb0 (Yagiz Nizipli) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0c11feeeca4a (Michaël Zasso) #55014
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #55014
  * (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #55014
  * (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) update V8 to 13.0.245.25 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) upgrade npm to 11.0.0 (npm team) #56274
  * (SEMVER-MAJOR) update undici to 7.0.0 (Node.js GitHub Bot) #56070
fs:
  * (SEMVER-MAJOR) remove ability to call truncate with fd (Yagiz Nizipli) #57567
  * (SEMVER-MAJOR) remove `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #55862
  * (SEMVER-MAJOR) deprecate passing invalid types in `fs.existsSync` (Carlos Espa) #55753
  * (SEMVER-MAJOR) runtime deprecate `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #49686
  * (SEMVER-MAJOR) remove `dirent.path` (Antoine du Hamel) #55548
lib:
  * (SEMVER-MAJOR) remove obsolete Cipher export (James M Snell) #57266
  * (SEMVER-MAJOR) unexpose six process bindings (Michaël Zasso) #57149
  * (SEMVER-MAJOR) make ALS default to AsyncContextFrame (Stephen Belanger) #55552
  * (SEMVER-MAJOR) runtime deprecate SlowBuffer (Rafael Gonzaga) #55175
net:
  * (SEMVER-MAJOR) make _setSimultaneousAccepts() end-of-life deprecated (Yagiz Nizipli) #57550
repl:
  * (SEMVER-MAJOR) runtime deprecate instantiating without new (Aviv Keller) #54869
src:
  * (SEMVER-MAJOR) update GetForegroundTaskRunner override (Etienne Pierre-doray) #55014
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 134 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) drop --experimental-permission in favour of --permission (Rafael Gonzaga) #56240
  * (SEMVER-MAJOR) add async context frame to AsyncResource (Gerhard Stöbich) #56082
  * (SEMVER-MAJOR) nuke deprecated and un-used enum members in `OptionEnvvarSettings` (Juan José) #53079
stream:
  * (SEMVER-MAJOR) catch and forward error from dest.write (jakecastelli) #55270
test:
  * (SEMVER-MAJOR) disable fast API call count checks (Michaël Zasso) #55014
test_runner:
  * (SEMVER-MAJOR) remove promises returned by t.test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) remove promises returned by test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) automatically wait for subtests to finish (Colin Ihrig) #56664
timers:
  * (SEMVER-MAJOR) check for immediate instance in clearImmediate (Gürgün Dayıoğlu) #57069
  * (SEMVER-MAJOR) set several methods EOL (Yagiz Nizipli) #56966
tls:
  * (SEMVER-MAJOR) remove deprecated tls.createSecurePair (Jonas) #57361
  * (SEMVER-MAJOR) make server.prototype.setOptions end-of-life (Yagiz Nizipli) #57339
tools:
  * (SEMVER-MAJOR) update V8 gypfiles for 13.0 (Michaël Zasso) #55014
url:
  * (SEMVER-MAJOR) expose urlpattern as global (Jonas) #56950
  * (SEMVER-MAJOR) runtime deprecate url.parse (Yagiz Nizipli) #55017
zlib:
  * (SEMVER-MAJOR) deprecate classes usage without `new` (Yagiz Nizipli) #55718

PR-URL: #57609
RafaelGSS pushed a commit that referenced this pull request Apr 1, 2025
PR-URL: #51821
Fixes: #51817
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS added a commit that referenced this pull request Apr 1, 2025
Semver-Major Commits:

buffer:
  * (SEMVER-MAJOR) make `buflen` in integer range (zhenweijin) #51821
build:
  * (SEMVER-MAJOR) bump supported macOS version to 13.5 (Michaël Zasso) #57115
  * (SEMVER-MAJOR) increase minimum Xcode version to 16.1 (Michaël Zasso) #56824
  * (SEMVER-MAJOR) link V8 with atomic library (Michaël Zasso) #55014
  * (SEMVER-MAJOR) remove support for ppc 32-bit (Michaël Zasso) #55014
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #55014
child_process:
  * (SEMVER-MAJOR) deprecate passing `args` to `spawn` and `execFile` (Daniel Venable) #57199
deps:
  * (SEMVER-MAJOR) V8: cherry-pick f915fa4c9f41 (Olivier Flückiger) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0d5d6e71bbb0 (Yagiz Nizipli) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0c11feeeca4a (Michaël Zasso) #55014
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #55014
  * (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #55014
  * (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) update V8 to 13.0.245.25 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) upgrade npm to 11.0.0 (npm team) #56274
  * (SEMVER-MAJOR) update undici to 7.0.0 (Node.js GitHub Bot) #56070
fs:
  * (SEMVER-MAJOR) remove ability to call truncate with fd (Yagiz Nizipli) #57567
  * (SEMVER-MAJOR) remove `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #55862
  * (SEMVER-MAJOR) deprecate passing invalid types in `fs.existsSync` (Carlos Espa) #55753
  * (SEMVER-MAJOR) runtime deprecate `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #49686
  * (SEMVER-MAJOR) remove `dirent.path` (Antoine du Hamel) #55548
lib:
  * (SEMVER-MAJOR) remove obsolete Cipher export (James M Snell) #57266
  * (SEMVER-MAJOR) unexpose six process bindings (Michaël Zasso) #57149
  * (SEMVER-MAJOR) make ALS default to AsyncContextFrame (Stephen Belanger) #55552
  * (SEMVER-MAJOR) runtime deprecate SlowBuffer (Rafael Gonzaga) #55175
net:
  * (SEMVER-MAJOR) make _setSimultaneousAccepts() end-of-life deprecated (Yagiz Nizipli) #57550
repl:
  * (SEMVER-MAJOR) runtime deprecate instantiating without new (Aviv Keller) #54869
src:
  * (SEMVER-MAJOR) update GetForegroundTaskRunner override (Etienne Pierre-doray) #55014
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 134 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) drop --experimental-permission in favour of --permission (Rafael Gonzaga) #56240
  * (SEMVER-MAJOR) add async context frame to AsyncResource (Gerhard Stöbich) #56082
  * (SEMVER-MAJOR) nuke deprecated and un-used enum members in `OptionEnvvarSettings` (Juan José) #53079
stream:
  * (SEMVER-MAJOR) catch and forward error from dest.write (jakecastelli) #55270
test:
  * (SEMVER-MAJOR) disable fast API call count checks (Michaël Zasso) #55014
test_runner:
  * (SEMVER-MAJOR) remove promises returned by t.test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) remove promises returned by test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) automatically wait for subtests to finish (Colin Ihrig) #56664
timers:
  * (SEMVER-MAJOR) check for immediate instance in clearImmediate (Gürgün Dayıoğlu) #57069
  * (SEMVER-MAJOR) set several methods EOL (Yagiz Nizipli) #56966
tls:
  * (SEMVER-MAJOR) remove deprecated tls.createSecurePair (Jonas) #57361
  * (SEMVER-MAJOR) make server.prototype.setOptions end-of-life (Yagiz Nizipli) #57339
tools:
  * (SEMVER-MAJOR) update V8 gypfiles for 13.0 (Michaël Zasso) #55014
url:
  * (SEMVER-MAJOR) expose urlpattern as global (Jonas) #56950
  * (SEMVER-MAJOR) runtime deprecate url.parse (Yagiz Nizipli) #55017
zlib:
  * (SEMVER-MAJOR) deprecate classes usage without `new` (Yagiz Nizipli) #55718

PR-URL: #57609
RafaelGSS pushed a commit that referenced this pull request Apr 1, 2025
PR-URL: #51821
Fixes: #51817
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS added a commit that referenced this pull request Apr 1, 2025
Semver-Major Commits:

buffer:
  * (SEMVER-MAJOR) make `buflen` in integer range (zhenweijin) #51821
build:
  * (SEMVER-MAJOR) bump supported macOS version to 13.5 (Michaël Zasso) #57115
  * (SEMVER-MAJOR) increase minimum Xcode version to 16.1 (Michaël Zasso) #56824
  * (SEMVER-MAJOR) link V8 with atomic library (Michaël Zasso) #55014
  * (SEMVER-MAJOR) remove support for ppc 32-bit (Michaël Zasso) #55014
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #55014
child_process:
  * (SEMVER-MAJOR) deprecate passing `args` to `spawn` and `execFile` (Daniel Venable) #57199
deps:
  * (SEMVER-MAJOR) V8: cherry-pick f915fa4c9f41 (Olivier Flückiger) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0d5d6e71bbb0 (Yagiz Nizipli) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0c11feeeca4a (Michaël Zasso) #55014
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #55014
  * (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #55014
  * (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) update V8 to 13.0.245.25 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) upgrade npm to 11.0.0 (npm team) #56274
  * (SEMVER-MAJOR) update undici to 7.0.0 (Node.js GitHub Bot) #56070
fs:
  * (SEMVER-MAJOR) remove ability to call truncate with fd (Yagiz Nizipli) #57567
  * (SEMVER-MAJOR) remove `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #55862
  * (SEMVER-MAJOR) deprecate passing invalid types in `fs.existsSync` (Carlos Espa) #55753
  * (SEMVER-MAJOR) runtime deprecate `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #49686
  * (SEMVER-MAJOR) remove `dirent.path` (Antoine du Hamel) #55548
lib:
  * (SEMVER-MAJOR) remove obsolete Cipher export (James M Snell) #57266
  * (SEMVER-MAJOR) unexpose six process bindings (Michaël Zasso) #57149
  * (SEMVER-MAJOR) make ALS default to AsyncContextFrame (Stephen Belanger) #55552
  * (SEMVER-MAJOR) runtime deprecate SlowBuffer (Rafael Gonzaga) #55175
net:
  * (SEMVER-MAJOR) make _setSimultaneousAccepts() end-of-life deprecated (Yagiz Nizipli) #57550
repl:
  * (SEMVER-MAJOR) runtime deprecate instantiating without new (Aviv Keller) #54869
src:
  * (SEMVER-MAJOR) update GetForegroundTaskRunner override (Etienne Pierre-doray) #55014
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 134 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) drop --experimental-permission in favour of --permission (Rafael Gonzaga) #56240
  * (SEMVER-MAJOR) add async context frame to AsyncResource (Gerhard Stöbich) #56082
  * (SEMVER-MAJOR) nuke deprecated and un-used enum members in `OptionEnvvarSettings` (Juan José) #53079
stream:
  * (SEMVER-MAJOR) catch and forward error from dest.write (jakecastelli) #55270
test:
  * (SEMVER-MAJOR) disable fast API call count checks (Michaël Zasso) #55014
test_runner:
  * (SEMVER-MAJOR) remove promises returned by t.test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) remove promises returned by test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) automatically wait for subtests to finish (Colin Ihrig) #56664
timers:
  * (SEMVER-MAJOR) check for immediate instance in clearImmediate (Gürgün Dayıoğlu) #57069
  * (SEMVER-MAJOR) set several methods EOL (Yagiz Nizipli) #56966
tls:
  * (SEMVER-MAJOR) remove deprecated tls.createSecurePair (Jonas) #57361
  * (SEMVER-MAJOR) make server.prototype.setOptions end-of-life (Yagiz Nizipli) #57339
tools:
  * (SEMVER-MAJOR) update V8 gypfiles for 13.0 (Michaël Zasso) #55014
url:
  * (SEMVER-MAJOR) expose urlpattern as global (Jonas) #56950
  * (SEMVER-MAJOR) runtime deprecate url.parse (Yagiz Nizipli) #55017
zlib:
  * (SEMVER-MAJOR) deprecate classes usage without `new` (Yagiz Nizipli) #55718

PR-URL: #57609
RafaelGSS added a commit that referenced this pull request Apr 1, 2025
Semver-Major Commits:

buffer:
  * (SEMVER-MAJOR) make `buflen` in integer range (zhenweijin) #51821
build:
  * (SEMVER-MAJOR) bump supported macOS version to 13.5 (Michaël Zasso) #57115
  * (SEMVER-MAJOR) increase minimum Xcode version to 16.1 (Michaël Zasso) #56824
  * (SEMVER-MAJOR) link V8 with atomic library (Michaël Zasso) #55014
  * (SEMVER-MAJOR) remove support for ppc 32-bit (Michaël Zasso) #55014
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #55014
child_process:
  * (SEMVER-MAJOR) deprecate passing `args` to `spawn` and `execFile` (Daniel Venable) #57199
deps:
  * (SEMVER-MAJOR) V8: cherry-pick f915fa4c9f41 (Olivier Flückiger) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0d5d6e71bbb0 (Yagiz Nizipli) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0c11feeeca4a (Michaël Zasso) #55014
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #55014
  * (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #55014
  * (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) update V8 to 13.0.245.25 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) upgrade npm to 11.0.0 (npm team) #56274
  * (SEMVER-MAJOR) update undici to 7.0.0 (Node.js GitHub Bot) #56070
fs:
  * (SEMVER-MAJOR) remove ability to call truncate with fd (Yagiz Nizipli) #57567
  * (SEMVER-MAJOR) remove `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #55862
  * (SEMVER-MAJOR) deprecate passing invalid types in `fs.existsSync` (Carlos Espa) #55753
  * (SEMVER-MAJOR) runtime deprecate `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #49686
  * (SEMVER-MAJOR) remove `dirent.path` (Antoine du Hamel) #55548
lib:
  * (SEMVER-MAJOR) remove obsolete Cipher export (James M Snell) #57266
  * (SEMVER-MAJOR) unexpose six process bindings (Michaël Zasso) #57149
  * (SEMVER-MAJOR) make ALS default to AsyncContextFrame (Stephen Belanger) #55552
  * (SEMVER-MAJOR) runtime deprecate SlowBuffer (Rafael Gonzaga) #55175
net:
  * (SEMVER-MAJOR) make _setSimultaneousAccepts() end-of-life deprecated (Yagiz Nizipli) #57550
repl:
  * (SEMVER-MAJOR) runtime deprecate instantiating without new (Aviv Keller) #54869
src:
  * (SEMVER-MAJOR) update GetForegroundTaskRunner override (Etienne Pierre-doray) #55014
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 134 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) drop --experimental-permission in favour of --permission (Rafael Gonzaga) #56240
  * (SEMVER-MAJOR) add async context frame to AsyncResource (Gerhard Stöbich) #56082
  * (SEMVER-MAJOR) nuke deprecated and un-used enum members in `OptionEnvvarSettings` (Juan José) #53079
stream:
  * (SEMVER-MAJOR) catch and forward error from dest.write (jakecastelli) #55270
test:
  * (SEMVER-MAJOR) disable fast API call count checks (Michaël Zasso) #55014
test_runner:
  * (SEMVER-MAJOR) remove promises returned by t.test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) remove promises returned by test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) automatically wait for subtests to finish (Colin Ihrig) #56664
timers:
  * (SEMVER-MAJOR) check for immediate instance in clearImmediate (Gürgün Dayıoğlu) #57069
  * (SEMVER-MAJOR) set several methods EOL (Yagiz Nizipli) #56966
tls:
  * (SEMVER-MAJOR) remove deprecated tls.createSecurePair (Jonas) #57361
  * (SEMVER-MAJOR) make server.prototype.setOptions end-of-life (Yagiz Nizipli) #57339
tools:
  * (SEMVER-MAJOR) update V8 gypfiles for 13.0 (Michaël Zasso) #55014
url:
  * (SEMVER-MAJOR) expose urlpattern as global (Jonas) #56950
  * (SEMVER-MAJOR) runtime deprecate url.parse (Yagiz Nizipli) #55017
zlib:
  * (SEMVER-MAJOR) deprecate classes usage without `new` (Yagiz Nizipli) #55718

PR-URL: #57609
RafaelGSS added a commit that referenced this pull request Apr 1, 2025
Semver-Major Commits:

buffer:
  * (SEMVER-MAJOR) make `buflen` in integer range (zhenweijin) #51821
build:
  * (SEMVER-MAJOR) bump supported macOS version to 13.5 (Michaël Zasso) #57115
  * (SEMVER-MAJOR) increase minimum Xcode version to 16.1 (Michaël Zasso) #56824
  * (SEMVER-MAJOR) link V8 with atomic library (Michaël Zasso) #55014
  * (SEMVER-MAJOR) remove support for ppc 32-bit (Michaël Zasso) #55014
  * (SEMVER-MAJOR) reset embedder string to "-node.0" (Michaël Zasso) #55014
child_process:
  * (SEMVER-MAJOR) deprecate passing `args` to `spawn` and `execFile` (Daniel Venable) #57199
deps:
  * (SEMVER-MAJOR) V8: cherry-pick f915fa4c9f41 (Olivier Flückiger) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0d5d6e71bbb0 (Yagiz Nizipli) #55014
  * (SEMVER-MAJOR) V8: cherry-pick 0c11feeeca4a (Michaël Zasso) #55014
  * (SEMVER-MAJOR) define V8_PRESERVE_MOST as no-op on Windows (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) always define V8_NODISCARD as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) fix FP16 bitcasts.h (Stefan Stojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to support compilation with MSVC (StefanStojanovic) #55014
  * (SEMVER-MAJOR) patch V8 to avoid duplicated zlib symbol (Michaël Zasso) #55014
  * (SEMVER-MAJOR) disable V8 concurrent sparkplug compilation (Michaël Zasso) #55014
  * (SEMVER-MAJOR) always define V8_EXPORT_PRIVATE as no-op (Michaël Zasso) #55014
  * (SEMVER-MAJOR) update V8 to 13.0.245.25 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) upgrade npm to 11.0.0 (npm team) #56274
  * (SEMVER-MAJOR) update undici to 7.0.0 (Node.js GitHub Bot) #56070
fs:
  * (SEMVER-MAJOR) remove ability to call truncate with fd (Yagiz Nizipli) #57567
  * (SEMVER-MAJOR) remove `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #55862
  * (SEMVER-MAJOR) deprecate passing invalid types in `fs.existsSync` (Carlos Espa) #55753
  * (SEMVER-MAJOR) runtime deprecate `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, `fs.X_OK` (Livia Medeiros) #49686
  * (SEMVER-MAJOR) remove `dirent.path` (Antoine du Hamel) #55548
lib:
  * (SEMVER-MAJOR) remove obsolete Cipher export (James M Snell) #57266
  * (SEMVER-MAJOR) unexpose six process bindings (Michaël Zasso) #57149
  * (SEMVER-MAJOR) make ALS default to AsyncContextFrame (Stephen Belanger) #55552
  * (SEMVER-MAJOR) runtime deprecate SlowBuffer (Rafael Gonzaga) #55175
net:
  * (SEMVER-MAJOR) make _setSimultaneousAccepts() end-of-life deprecated (Yagiz Nizipli) #57550
repl:
  * (SEMVER-MAJOR) runtime deprecate instantiating without new (Aviv Keller) #54869
src:
  * (SEMVER-MAJOR) update GetForegroundTaskRunner override (Etienne Pierre-doray) #55014
  * (SEMVER-MAJOR) update NODE_MODULE_VERSION to 134 (Michaël Zasso) #55014
  * (SEMVER-MAJOR) drop --experimental-permission in favour of --permission (Rafael Gonzaga) #56240
  * (SEMVER-MAJOR) add async context frame to AsyncResource (Gerhard Stöbich) #56082
  * (SEMVER-MAJOR) nuke deprecated and un-used enum members in `OptionEnvvarSettings` (Juan José) #53079
stream:
  * (SEMVER-MAJOR) catch and forward error from dest.write (jakecastelli) #55270
test:
  * (SEMVER-MAJOR) disable fast API call count checks (Michaël Zasso) #55014
test_runner:
  * (SEMVER-MAJOR) remove promises returned by t.test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) remove promises returned by test() (Colin Ihrig) #56664
  * (SEMVER-MAJOR) automatically wait for subtests to finish (Colin Ihrig) #56664
timers:
  * (SEMVER-MAJOR) check for immediate instance in clearImmediate (Gürgün Dayıoğlu) #57069
  * (SEMVER-MAJOR) set several methods EOL (Yagiz Nizipli) #56966
tls:
  * (SEMVER-MAJOR) remove deprecated tls.createSecurePair (Jonas) #57361
  * (SEMVER-MAJOR) make server.prototype.setOptions end-of-life (Yagiz Nizipli) #57339
tools:
  * (SEMVER-MAJOR) update V8 gypfiles for 13.0 (Michaël Zasso) #55014
url:
  * (SEMVER-MAJOR) expose urlpattern as global (Jonas) #56950
  * (SEMVER-MAJOR) runtime deprecate url.parse (Yagiz Nizipli) #55017
zlib:
  * (SEMVER-MAJOR) deprecate classes usage without `new` (Yagiz Nizipli) #55718

PR-URL: #57609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. buffer Issues and PRs related to the buffer subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buffer.utf8Write() fails to write when buffer length exceeds 2 GB
10 participants