[v24.x backport] build: build codecache and snapshot with libnode - #64632
Closed
legendecas wants to merge 230 commits into
Closed
[v24.x backport] build: build codecache and snapshot with libnode#64632legendecas wants to merge 230 commits into
legendecas wants to merge 230 commits into
Conversation
Replace the O(n) case-insensitive algorithm-name scan
with an O(1) SafeMap lookup. The map is pre-built at
module init alongside kSupportedAlgorithms.
Hoist the opts object literal used in normalizeAlgorithm
to module level to avoid allocating identical
{ prefix, context } objects on every call.
Pre-compute ObjectKeys() for simpleAlgorithmDictionaries
entries at module init to avoid allocating a new keys
array on every normalizeAlgorithm call.
Signed-off-by: Filip Skokan <[email protected]>
PR-URL: nodejs#62756
Reviewed-By: Yagiz Nizipli <[email protected]>
Replace object spread in nested WebIDL conversion options with stable-shape ordinary objects. This keeps hot dictionary and sequence conversion paths from allocating null-prototype spread results. Apply the same pattern to Web Crypto converter wrappers that override allowResizable or enable [EnforceRange]. Signed-off-by: Filip Skokan <[email protected]> PR-URL: nodejs#62756 Reviewed-By: Yagiz Nizipli <[email protected]>
Signed-off-by: Matteo Collina <[email protected]> PR-URL: nodejs#62562 Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Nad Alaba <[email protected]> PR-URL: nodejs#63117 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Signed-off-by: avivkeller <[email protected]> PR-URL: nodejs#63493 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: René <[email protected]>
Rename WebCrypto operation parameters and local variables to match the spec terminology. Use operation, algorithm, and key names consistently between the docs and implementation. Signed-off-by: Filip Skokan <[email protected]> PR-URL: nodejs#63518 Reviewed-By: René <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Drive the regression test from the WebCrypto algorithm registry so all supported algorithms and operations must add explicit coverage regardless of whether they are native-job backed or js-based. Signed-off-by: Filip Skokan <[email protected]> PR-URL: nodejs#63520 Reviewed-By: René <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]>
Refs: nodejs#62761 Signed-off-by: StefanStojanovic <[email protected]> PR-URL: nodejs#63413 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Signed-off-by: Mohamed Sayed <[email protected]> PR-URL: nodejs#63529 Fixes: nodejs#63514 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Signed-off-by: Filip Skokan <[email protected]> PR-URL: nodejs#63556 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Chemi Atlow <[email protected]>
Signed-off-by: Filip Skokan <[email protected]> PR-URL: nodejs#63556 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Chemi Atlow <[email protected]>
Signed-off-by: Filip Skokan <[email protected]> PR-URL: nodejs#63556 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Chemi Atlow <[email protected]>
Signed-off-by: Filip Skokan <[email protected]> PR-URL: nodejs#63556 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Chemi Atlow <[email protected]>
Signed-off-by: Mert Can Altin <[email protected]> PR-URL: nodejs#63385 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Gürgün Dayıoğlu <[email protected]>
Fix build warnings by casting the number literals to the size_t constants they are compared against. Signed-off-by: Maya Lekova <[email protected]> PR-URL: nodejs#63490 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: René <[email protected]>
PR-URL: nodejs#63668 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#63669 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Signed-off-by: Mohamed Sayed <[email protected]> PR-URL: nodejs#63601 Fixes: nodejs#63513 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Matthew Aitken <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Signed-off-by: RafaelGSS <[email protected]> PR-URL: nodejs#63293 Reviewed-By: Antoine du Hamel <[email protected]>
This function call can fail with `Z_VERSION_ERROR` if the compiled
library vs loaded library mismatched in version number or in
stream structure size.
In those cases, zlib doesn't initialize the `strm_.msg` field to
null. Therefore, when a `CompressionError` object is created via
`ErrorForMessage()`, it can read a stale or uninitialized `strm_.msg`
pointer that will cause a crash.
Example ASAN report:
```
AddressSanitizer: SEGV on unknown address
#0 __strlen_avx2
string/../sysdeps/x86_64/multiarch/strlen-avx2.S:76
#1 strlen (/work/node/out/Debug/node+0x1a42ab7)
#2 v8::(anonymous namespace)::StringLength(char const*)
/work/node/out/../deps/v8/src/api/api.cc:7581:16
#3 v8::(anonymous namespace)::StringLength(unsigned char const*)
/work/node/out/../deps/v8/src/api/api.cc:7587:10
nodejs#4 v8::String::NewFromOneByte(v8::Isolate*,
unsigned char const*, v8::NewStringType, int)
/work/node/out/../deps/v8/src/api/api.cc:7677:3
nodejs#5 node::OneByteString(v8::Isolate*,
char const*, int, v8::NewStringType)
/work/node/out/../src/util-inl.h:166:10
nodejs#6 node::(anonymous namespace)::CompressionStream<
node::(anonymous namespace)::ZlibContext>
::EmitError(node::(anonymous namespace)
::CompressionError const&)
/work/node/out/../src/node_zlib.cc:565:7
nodejs#7 node::(anonymous namespace)::CompressionStream<
node::(anonymous namespace)::ZlibContext>
::CheckError()
/work/node/out/../src/node_zlib.cc:519:5
nodejs#8 node::(anonymous namespace)::CompressionStream<
node::(anonymous namespace)::ZlibContext>
::AfterThreadPoolWork(int)
/work/node/out/../src/node_zlib.cc:543:10
nodejs#9 node::ThreadPoolWork::ScheduleWork()
::'lambda'(uv_work_s*, int)
::operator()(uv_work_s*, int) const
/work/node/out/../src/threadpoolwork-inl.h:57:15
nodejs#10 node::ThreadPoolWork::ScheduleWork()
::'lambda'(uv_work_s*, int)
::__invoke(uv_work_s*, int)
/work/node/out/../src/threadpoolwork-inl.h:48:7
nodejs#11 uv__work_done /work/libuv-1.51.0/src/threadpool.c:330:5
nodejs#12 uv__async_io.part.0
/work/libuv-1.51.0/src/unix/async.c:208:5
```
Signed-off-by: ndossche <[email protected]>
PR-URL: nodejs#63476
Reviewed-By: Anna Henningsen <[email protected]>
Signed-off-by: arbinger <[email protected]> PR-URL: nodejs#63050 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]>
PR-URL: nodejs#63670 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Chemi Atlow <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#63545 Refs: nodejs#55794 Reviewed-By: Antoine du Hamel <[email protected]>
Signed-off-by: Tobias Nießen <[email protected]> PR-URL: nodejs#63644 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Filip Skokan <[email protected]>
Update the setRawMode documentation to specify that raw mode disables special processing of input characters only. Output processing, such as newline translation on Unix terminals, is not affected. Fixes: nodejs#63059 Signed-off-by: zeeshan56656 <[email protected]> PR-URL: nodejs#63438 Reviewed-By: Anna Henningsen <[email protected]>
A recursively watched directory can be removed after a parent watcher observes it but before the non-native recursive watcher scans it. Ignore ENOENT from the directory scan so this deletion race does not emit an unhandled watcher error. Signed-off-by: Kamat, Trivikram <[email protected]> Assisted-by: openai:gpt-5.5 PR-URL: nodejs#63686 Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-06-01.md#jstest-failure Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Use common.nodeProcessAborted() for the intentional abort path so platform-specific abort signals such as SIGILL are accepted. Signed-off-by: Kamat, Trivikram <[email protected]> Assisted-by: openai:gpt-5.5 PR-URL: nodejs#63687 Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-06-01.md#jstest-failure Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Signed-off-by: Herrtian <[email protected]> PR-URL: nodejs#63542 Fixes: nodejs#62774 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Signed-off-by: Daijiro Wachi <[email protected]> PR-URL: nodejs#63700 Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]>
Signed-off-by: Antoine du Hamel <[email protected]> PR-URL: nodejs#63707 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Bumps the eslint group in /tools/eslint with 8 updates: | Package | From | To | | --- | --- | --- | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `8.0.0-rc.6` | `8.0.1` | | [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) | `8.0.0-rc.6` | `8.0.1` | | [@babel/plugin-syntax-import-defer](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-import-defer) | `8.0.0-rc.6` | `8.0.1` | | [@babel/plugin-syntax-import-source](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-import-source) | `8.0.0-rc.6` | `8.0.1` | | [eslint](https://github.com/eslint/eslint) | `10.4.0` | `10.5.0` | | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `63.0.0` | `63.0.9` | | [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp) | `3.1.0` | `3.1.1` | | [globals](https://github.com/sindresorhus/globals) | `17.6.0` | `17.7.0` | Updates `@babel/core` from 8.0.0-rc.6 to 8.0.1 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.1/packages/babel-core) Updates `@babel/eslint-parser` from 8.0.0-rc.6 to 8.0.1 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.1/eslint/babel-eslint-parser) Updates `@babel/plugin-syntax-import-defer` from 8.0.0-rc.6 to 8.0.1 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.1/packages/babel-plugin-syntax-import-defer) Updates `@babel/plugin-syntax-import-source` from 8.0.0-rc.6 to 8.0.1 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v8.0.1/packages/babel-plugin-syntax-import-source) Updates `eslint` from 10.4.0 to 10.5.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v10.4.0...v10.5.0) Updates `eslint-plugin-jsdoc` from 63.0.0 to 63.0.9 - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Commits](gajus/eslint-plugin-jsdoc@v63.0.0...v63.0.9) Updates `eslint-plugin-regexp` from 3.1.0 to 3.1.1 - [Release notes](https://github.com/ota-meshi/eslint-plugin-regexp/releases) - [Changelog](https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/CHANGELOG.md) - [Commits](ota-meshi/eslint-plugin-regexp@v3.1.0...v3.1.1) Updates `globals` from 17.6.0 to 17.7.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](sindresorhus/globals@v17.6.0...v17.7.0) --- updated-dependencies: - dependency-name: "@babel/core" dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: "@babel/eslint-parser" dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: "@babel/plugin-syntax-import-defer" dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: "@babel/plugin-syntax-import-source" dependency-version: 8.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: eslint dependency-version: 10.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint-plugin-jsdoc dependency-version: 63.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: eslint-plugin-regexp dependency-version: 3.1.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: globals dependency-version: 17.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] <[email protected]> PR-URL: nodejs#64249 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Consolidate the spec's per-chunk predicate chains (CanCloseOrEnqueue, IsLocked, HasDefaultReader, GetNumReadRequests, GetDesiredSize and the writable-side equivalents) into single passes over the controller and stream state, mirror "close queued or in flight" as a boolean flag maintained at the few close-request transition sites, and materialize the TransformStream [[backpressureChangePromise]] record lazily on first observation so backpressure flips nobody is waiting on allocate nothing. Assisted-by: Claude Code Signed-off-by: Matteo Collina <[email protected]> PR-URL: nodejs#64252 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Filip Skokan <[email protected]>
Signed-off-by: Antoine du Hamel <[email protected]> PR-URL: nodejs#64259 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: René <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Signed-off-by: Guy Bedford <[email protected]> PR-URL: nodejs#63951 Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: Chengzhong Wu <[email protected]> PR-URL: nodejs#63626 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gürgün Dayıoğlu <[email protected]>
With the introduction of always static target `node_base`, `node_aix_shared` is now redundant. Signed-off-by: Chengzhong Wu <[email protected]> PR-URL: nodejs#63747 Refs: nodejs#63626 Reviewed-By: Colin Ihrig <[email protected]>
Collaborator
|
Review requested:
|
Collaborator
aduh95
approved these changes
Jul 21, 2026
aduh95
pushed a commit
that referenced
this pull request
Jul 21, 2026
Signed-off-by: Chengzhong Wu <[email protected]> PR-URL: #63626 Backport-PR-URL: #64632 Reviewed-By: Antoine du Hamel <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Jul 21, 2026
With the introduction of always static target `node_base`, `node_aix_shared` is now redundant. Signed-off-by: Chengzhong Wu <[email protected]> PR-URL: #63747 Backport-PR-URL: #64632 Refs: #63626 Reviewed-By: Antoine du Hamel <[email protected]>
Collaborator
aduh95
pushed a commit
that referenced
this pull request
Jul 22, 2026
Signed-off-by: Chengzhong Wu <[email protected]> PR-URL: #63626 Backport-PR-URL: #64632 Reviewed-By: Antoine du Hamel <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Jul 22, 2026
With the introduction of always static target `node_base`, `node_aix_shared` is now redundant. Signed-off-by: Chengzhong Wu <[email protected]> PR-URL: #63747 Backport-PR-URL: #64632 Refs: #63626 Reviewed-By: Antoine du Hamel <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Jul 30, 2026
Signed-off-by: Chengzhong Wu <[email protected]> PR-URL: #63626 Backport-PR-URL: #64632 Reviewed-By: Antoine du Hamel <[email protected]>
aduh95
pushed a commit
that referenced
this pull request
Jul 30, 2026
With the introduction of always static target `node_base`, `node_aix_shared` is now redundant. Signed-off-by: Chengzhong Wu <[email protected]> PR-URL: #63747 Backport-PR-URL: #64632 Refs: #63626 Reviewed-By: Antoine du Hamel <[email protected]>
Contributor
|
Landed in a23cdec...6e2f7e6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This backports #63626 and #63747 to v24.x.