src: add GetBuildId helper function#355
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds Linux-only ELF build-id utilities (source and header), updates build configs to include them and adjust Linux/OpenHarmony linker flags, and introduces a Linux-specific test addon and test script that validates build-id retrieval from the Node executable using libelf. Changes
Sequence Diagram(s)sequenceDiagram
participant TestJS as Test (nsolid-elf-utils.js)
participant Addon as Native Addon (binding.cc)
participant Utils as elf_utils::GetBuildId
participant LibELF as libelf
TestJS->>Addon: getBuildId(process.execPath)
Addon->>Utils: GetBuildId(path, &build_id)
Utils->>LibELF: elf_version/elf_begin/iterate sections
LibELF-->>Utils: .note.gnu.build-id data
Utils-->>Addon: build_id (hex) or error
Addon-->>TestJS: build_id string (on success)
TestJS->>TestJS: assert equals readelf-derived ID
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
src/nsolid/nsolid_elf_utils.h (1)
12-12: Consider documenting the return value semantics.The function returns an
intstatus code, but the expected values (0 for success, non-zero for failure) should be documented for API clarity.Add a brief comment documenting the return value:
namespace elf_utils { + // Returns 0 on success, non-zero on failure. int GetBuildId(const std::string& path, std::string* build_id); } // namespace elf_utilstest/addons/nsolid-elf-utils/binding.cc (1)
14-29: Consider returning an error instead of undefined when GetBuildId fails.When
GetBuildIdreturns a non-zero error code, the function currently returnsundefinedby not setting any return value. This makes it difficult for JavaScript code to distinguish between different error conditions (file not found, invalid ELF, no build-id, etc.).Consider throwing a JavaScript exception with the error code to provide better error context:
static void GetBuildId(const FunctionCallbackInfo<Value>& args) { #if defined(__linux__) Isolate* isolate = args.GetIsolate(); assert(args[0]->IsString()); v8::String::Utf8Value path_utf8(isolate, args[0]); std::string path(*path_utf8, path_utf8.length()); std::string build_id; int res = node::nsolid::elf_utils::GetBuildId(path, &build_id); if (res != 0) { - return; + std::string error_msg = "Failed to get build-id: error code " + std::to_string(res); + isolate->ThrowException(v8::Exception::Error( + String::NewFromUtf8(isolate, error_msg.c_str()).ToLocalChecked())); + return; } args.GetReturnValue().Set( String::NewFromUtf8(isolate, build_id.c_str()).ToLocalChecked()); #endif }src/nsolid/nsolid_elf_utils.cc (1)
29-35: Consider returning more specific error codes.The function returns
elf_errno()whenelf_version(EV_CURRENT)fails. While this is technically correct,elf_errno()might return 0 if no error was previously set, which could be confusing.Consider returning a more specific error code or ensuring elf_errno() is non-zero:
ret = 0; if (elf_version(EV_CURRENT) == EV_NONE) { - return elf_errno(); + int err = elf_errno(); + return err ? err : ELF_E_VERSION; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
node.gyp(1 hunks)node.gypi(1 hunks)src/nsolid/nsolid_elf_utils.cc(1 hunks)src/nsolid/nsolid_elf_utils.h(1 hunks)test/addons/nsolid-elf-utils/binding.cc(1 hunks)test/addons/nsolid-elf-utils/binding.gyp(1 hunks)test/addons/nsolid-elf-utils/nsolid-elf-utils.js(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: santigimeno
PR: nodesource/nsolid#339
File: src/nsolid/nsolid_elf_utils.cc:18-18
Timestamp: 2025-07-08T16:05:45.341Z
Learning: In the NSolid project, the `GetBuildId` function in `src/nsolid/nsolid_elf_utils.cc` is designed to be called only from the NSolid thread, so the static cache doesn't require thread safety mechanisms like mutex protection.
📚 Learning: 2025-07-08T16:05:45.341Z
Learnt from: santigimeno
PR: nodesource/nsolid#339
File: src/nsolid/nsolid_elf_utils.cc:18-18
Timestamp: 2025-07-08T16:05:45.341Z
Learning: In the NSolid project, the `GetBuildId` function in `src/nsolid/nsolid_elf_utils.cc` is designed to be called only from the NSolid thread, so the static cache doesn't require thread safety mechanisms like mutex protection.
Applied to files:
src/nsolid/nsolid_elf_utils.htest/addons/nsolid-elf-utils/nsolid-elf-utils.jssrc/nsolid/nsolid_elf_utils.cctest/addons/nsolid-elf-utils/binding.cc
📚 Learning: 2025-07-08T14:48:04.827Z
Learnt from: santigimeno
PR: nodesource/nsolid#339
File: test/addons/nsolid-elf-utils/binding.cc:13-28
Timestamp: 2025-07-08T14:48:04.827Z
Learning: In nsolid test native addons (e.g., `test/addons/*/binding.cc`), additional JavaScript-facing argument validation is typically omitted because the tests supply well-formed inputs.
Applied to files:
test/addons/nsolid-elf-utils/binding.gyptest/addons/nsolid-elf-utils/nsolid-elf-utils.jstest/addons/nsolid-elf-utils/binding.cc
📚 Learning: 2025-07-08T14:46:47.806Z
Learnt from: santigimeno
PR: nodesource/nsolid#339
File: test/addons/nsolid-elf-utils/nsolid-elf-utils.js:13-14
Timestamp: 2025-07-08T14:46:47.806Z
Learning: In the nsolid test suite, native addon bindings are expected to be built beforehand; tests do not add fs.existsSync guards to skip when bindings are missing.
Applied to files:
test/addons/nsolid-elf-utils/binding.gyptest/addons/nsolid-elf-utils/nsolid-elf-utils.jstest/addons/nsolid-elf-utils/binding.cc
📚 Learning: 2025-07-08T14:47:34.724Z
Learnt from: santigimeno
PR: nodesource/nsolid#339
File: test/addons/nsolid-elf-utils/nsolid-elf-utils.js:16-18
Timestamp: 2025-07-08T14:47:34.724Z
Learning: In the nsolid test suite, external tool invocations (e.g., execSync to run `readelf`) are intentionally left uncaught so that any failure causes the test to fail rather than being skipped.
Applied to files:
test/addons/nsolid-elf-utils/nsolid-elf-utils.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: build-tarball
- GitHub Check: lint-js-and-md
- GitHub Check: coverage-windows
- GitHub Check: test-macOS
- GitHub Check: build-docs
- GitHub Check: test-linux (ubuntu-24.04-arm)
- GitHub Check: test-linux (ubuntu-24.04)
🔇 Additional comments (13)
node.gypi (1)
553-565: LGTM! Cleaner separation of linker rules for OpenHarmony and Linux.The refactoring properly splits the combined condition into two OS-specific blocks, making the linker configuration more maintainable and explicit for each platform. The Linux block now unconditionally links
-lelf(required for the new ELF utilities) and conditionally handles-lrtbased onnsolid_use_librt.test/addons/nsolid-elf-utils/binding.gyp (1)
1-10: LGTM! Properly configured test addon target.The binding target is correctly configured with the necessary
NODE_WANT_INTERNALS=1define to access the internal ELF utilities API, and properly includes the common build settings.node.gyp (1)
581-586: LGTM! Correct Linux-specific inclusion of ELF utilities.The conditional addition of ELF utility sources to
nsolid_sourceson Linux is properly implemented, aligning with the platform-specific nature of the Build-Id functionality.test/addons/nsolid-elf-utils/nsolid-elf-utils.js (4)
1-11: LGTM! Proper platform check and early exit.The platform check correctly skips the test on non-Linux systems with an informative message.
13-14: LGTM! Consistent with nsolid test suite conventions.The binding loading follows the established pattern without fs.existsSync guards, as per the team's conventions documented in the learnings.
20-23: LGTM! Clear test assertion with helpful error message.The test correctly validates the Build ID and provides a descriptive error message on mismatch, which aids in debugging.
16-18: Add a clear fallback whenreadelfis missingTo prevent cryptic ENOENT failures in CI environments where
readelfisn’t installed, wrap theexecSyncinvocation in a try/catch and emit a descriptive error (or provide alternate logic) ifreadelfisn’t found:• File: test/addons/nsolid-elf-utils/nsolid-elf-utils.js
• Lines: 16–18Suggested update:
let expected; try { expected = execSync( `readelf -n ${process.execPath} | awk '/Build ID/ { print $3 }'`, { encoding: 'utf8' } ).trim(); } catch (err) { if (err.code === 'ENOENT') { throw new Error( 'The `readelf` tool is required to run this test but was not found in your PATH.' ); } throw err; }This ensures that missing dependencies produce a clear, actionable error.
⛔ Skipped due to learnings
Learnt from: santigimeno PR: nodesource/nsolid#339 File: test/addons/nsolid-elf-utils/nsolid-elf-utils.js:16-18 Timestamp: 2025-07-08T14:47:34.724Z Learning: In the nsolid test suite, external tool invocations (e.g., execSync to run `readelf`) are intentionally left uncaught so that any failure causes the test to fail rather than being skipped.Learnt from: santigimeno PR: nodesource/nsolid#339 File: test/addons/nsolid-elf-utils/nsolid-elf-utils.js:13-14 Timestamp: 2025-07-08T14:46:47.806Z Learning: In the nsolid test suite, native addon bindings are expected to be built beforehand; tests do not add fs.existsSync guards to skip when bindings are missing.src/nsolid/nsolid_elf_utils.h (1)
1-19: LGTM! Well-structured header with proper guards.The header is properly organized with:
- Standard include guards
- NODE_WANT_INTERNALS conditional compilation
- Clear namespace hierarchy
- Clean API declaration
test/addons/nsolid-elf-utils/binding.cc (2)
1-7: LGTM!The header includes and platform-specific guard are properly structured.
31-33: LGTM!Module initialization correctly exports the function.
src/nsolid/nsolid_elf_utils.cc (3)
1-15: LGTM!Headers are properly included and namespaces are correctly structured.
17-28: Thread safety consideration for the static cache.Based on the retrieved learnings, the
GetBuildIdfunction is designed to be called only from the NSolid thread, so the static cache doesn't require thread safety mechanisms. This design constraint is valid for the current implementation.
85-90: Resource cleanup order looks correct.The cleanup sequence properly handles both the ELF object and file descriptor in the correct order, ensuring resources are freed even on error paths.
| *build_id = std::string(""); | ||
| while ((scn = elf_nextscn(e, scn)) != nullptr) { | ||
| if (gelf_getshdr(scn, &shdr) != &shdr) { | ||
| ret = elf_errno(); | ||
| goto end_error; | ||
| } | ||
|
|
||
| char* name = elf_strptr(e, shstrndx, shdr.sh_name); | ||
| if (name && strcmp(name, ".note.gnu.build-id") == 0) { | ||
| Elf_Data* data = elf_getdata(scn, nullptr); | ||
| if (data && data->d_size >= 16) { | ||
| // ELF Note header: namesz(4), descsz(4), type(4) + name padding | ||
| // Compute offset to build-id properly | ||
| uint32_t* note = reinterpret_cast<uint32_t*>(data->d_buf); | ||
| uint32_t namesz = note[0]; | ||
| uint32_t descsz = note[1]; | ||
| // Name starts at offset 12 | ||
| // Descriptor (build-id) starts at next aligned offset | ||
| size_t name_end = 12 + ((namesz + 3) & ~3); | ||
| uint8_t* id = reinterpret_cast<uint8_t*>(data->d_buf) + name_end; | ||
| *build_id = utils::buffer_to_hex(id, descsz); | ||
| break; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Potential buffer overflow risk in ELF note parsing.
The code assumes the ELF note structure without validating that the computed offsets don't exceed the buffer bounds. While data->d_size >= 16 checks for minimum size, it doesn't ensure that name_end + descsz doesn't exceed data->d_size.
Add bounds checking before accessing the build-id data:
*build_id = std::string("");
while ((scn = elf_nextscn(e, scn)) != nullptr) {
if (gelf_getshdr(scn, &shdr) != &shdr) {
ret = elf_errno();
goto end_error;
}
char* name = elf_strptr(e, shstrndx, shdr.sh_name);
if (name && strcmp(name, ".note.gnu.build-id") == 0) {
Elf_Data* data = elf_getdata(scn, nullptr);
if (data && data->d_size >= 16) {
// ELF Note header: namesz(4), descsz(4), type(4) + name padding
// Compute offset to build-id properly
uint32_t* note = reinterpret_cast<uint32_t*>(data->d_buf);
uint32_t namesz = note[0];
uint32_t descsz = note[1];
// Name starts at offset 12
// Descriptor (build-id) starts at next aligned offset
size_t name_end = 12 + ((namesz + 3) & ~3);
+ // Ensure we don't read beyond the buffer
+ if (name_end + descsz > data->d_size) {
+ ret = ELF_E_DATA;
+ goto end_error;
+ }
uint8_t* id = reinterpret_cast<uint8_t*>(data->d_buf) + name_end;
*build_id = utils::buffer_to_hex(id, descsz);
break;
}
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| *build_id = std::string(""); | |
| while ((scn = elf_nextscn(e, scn)) != nullptr) { | |
| if (gelf_getshdr(scn, &shdr) != &shdr) { | |
| ret = elf_errno(); | |
| goto end_error; | |
| } | |
| char* name = elf_strptr(e, shstrndx, shdr.sh_name); | |
| if (name && strcmp(name, ".note.gnu.build-id") == 0) { | |
| Elf_Data* data = elf_getdata(scn, nullptr); | |
| if (data && data->d_size >= 16) { | |
| // ELF Note header: namesz(4), descsz(4), type(4) + name padding | |
| // Compute offset to build-id properly | |
| uint32_t* note = reinterpret_cast<uint32_t*>(data->d_buf); | |
| uint32_t namesz = note[0]; | |
| uint32_t descsz = note[1]; | |
| // Name starts at offset 12 | |
| // Descriptor (build-id) starts at next aligned offset | |
| size_t name_end = 12 + ((namesz + 3) & ~3); | |
| uint8_t* id = reinterpret_cast<uint8_t*>(data->d_buf) + name_end; | |
| *build_id = utils::buffer_to_hex(id, descsz); | |
| break; | |
| } | |
| } | |
| } | |
| *build_id = std::string(""); | |
| while ((scn = elf_nextscn(e, scn)) != nullptr) { | |
| if (gelf_getshdr(scn, &shdr) != &shdr) { | |
| ret = elf_errno(); | |
| goto end_error; | |
| } | |
| char* name = elf_strptr(e, shstrndx, shdr.sh_name); | |
| if (name && strcmp(name, ".note.gnu.build-id") == 0) { | |
| Elf_Data* data = elf_getdata(scn, nullptr); | |
| if (data && data->d_size >= 16) { | |
| // ELF Note header: namesz(4), descsz(4), type(4) + name padding | |
| // Compute offset to build-id properly | |
| uint32_t* note = reinterpret_cast<uint32_t*>(data->d_buf); | |
| uint32_t namesz = note[0]; | |
| uint32_t descsz = note[1]; | |
| // Name starts at offset 12 | |
| // Descriptor (build-id) starts at next aligned offset | |
| size_t name_end = 12 + ((namesz + 3) & ~3); | |
| // Ensure we don't read beyond the buffer | |
| if (name_end + descsz > data->d_size) { | |
| ret = ELF_E_DATA; | |
| goto end_error; | |
| } | |
| uint8_t* id = reinterpret_cast<uint8_t*>(data->d_buf) + name_end; | |
| *build_id = utils::buffer_to_hex(id, descsz); | |
| break; | |
| } | |
| } | |
| } |
🤖 Prompt for AI Agents
In src/nsolid/nsolid_elf_utils.cc around lines 53 to 77, the ELF note parsing
computes name_end and then reads descsz bytes without verifying the computed
offsets fit inside data->d_size; add explicit bounds checks before accessing the
build-id: validate data and data->d_buf are non-null, cast namesz and descsz to
size_t and check namesz/descsz are reasonable (e.g. not absurdly large), compute
name_end = 12 + ((namesz + 3) & ~3) using size_t and ensure name_end <=
data->d_size and name_end + descsz <= data->d_size (also guard against overflow
when adding), and only then set *build_id from the id pointer; on failure, skip
this note or set an error/continue instead of reading out-of-bounds.
a6d9f60 to
82582a7
Compare
b9b23be to
649ccda
Compare
82582a7 to
75c8a88
Compare
This addresses a long-standing TODO comment, referencing the fact that these values are either known at compile time or can be inferred from the `this` value in the context class. PR-URL: nodejs/node#61717 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This is both valuable as a diagnostic tool and as a way to inform the JS runtime about external allocations. Currently, this is a feature only enabled in the statically linked builds of zstd, so with `--shared-zstd`, we fall back to the non-tracking variant. PR-URL: nodejs/node#61717 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: nodejs/node#61757 Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh>
Build it with gdbjit support on supported platforms by default allows debugging JIT-compiled code in gdb when it's also enabled at run time (via --gdbjit). Simply building it in should not incur an overhead if it's not also enabled at run time. PR-URL: nodejs/node#61010 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: nodejs/node#61728 Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#61729 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#61731 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#61756 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#61735 Fixes: nodejs/node#59282 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Claudio Wunder <cwunder@gnome.org> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#42251 Reviewed-By: Stewart X Addison <sxa@redhat.com>
PR-URL: nodejs/node#61765 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#61632 Refs: nodejs/node#58664 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mattias Buelens <mattias@buelens.com>
Fixes: nodejs/node#61116 Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com> PR-URL: nodejs/node#61178 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com> PR-URL: nodejs/node#61754 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Stewart X Addison <sxa@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#60548 Fixes: nodejs/node#60507 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
PR-URL: nodejs/node#61652 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Bumps the eslint group in /tools/eslint with 6 updates: | Package | From | To | | --- | --- | --- | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.28.5` | `7.28.6` | | [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) | `7.28.5` | `7.28.6` | | [@babel/plugin-syntax-import-source](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-import-source) | `7.27.1` | `7.28.6` | | [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) | `5.6.1` | `5.7.1` | | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `61.5.0` | `62.4.1` | | [globals](https://github.com/sindresorhus/globals) | `16.5.0` | `17.2.0` | Updates `@babel/core` from 7.28.5 to 7.28.6 - [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/v7.28.6/packages/babel-core) Updates `@babel/eslint-parser` from 7.28.5 to 7.28.6 - [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/v7.28.6/eslint/babel-eslint-parser) Updates `@babel/plugin-syntax-import-source` from 7.27.1 to 7.28.6 - [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/v7.28.6/packages/babel-plugin-syntax-import-source) Updates `@stylistic/eslint-plugin` from 5.6.1 to 5.7.1 - [Release notes](https://github.com/eslint-stylistic/eslint-stylistic/releases) - [Changelog](https://github.com/eslint-stylistic/eslint-stylistic/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint-stylistic/eslint-stylistic/commits/v5.7.1/packages/eslint-plugin) Updates `eslint-plugin-jsdoc` from 61.5.0 to 62.4.1 - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Commits](gajus/eslint-plugin-jsdoc@v61.5.0...v62.4.1) Updates `globals` from 16.5.0 to 17.2.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](sindresorhus/globals@v16.5.0...v17.2.0) --- updated-dependencies: - dependency-name: "@babel/core" dependency-version: 7.28.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: "@babel/eslint-parser" dependency-version: 7.28.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: "@babel/plugin-syntax-import-source" dependency-version: 7.28.6 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: eslint - dependency-name: "@stylistic/eslint-plugin" dependency-version: 5.7.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint-plugin-jsdoc dependency-version: 62.4.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: eslint - dependency-name: globals dependency-version: 17.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: eslint ... Signed-off-by: dependabot[bot] <support@github.com> PR-URL: nodejs/node#61628 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh>
Bumps the doc group in /tools/doc with 1 update: [unist-util-visit](https://github.com/syntax-tree/unist-util-visit). Updates `unist-util-visit` from 5.0.0 to 5.1.0 - [Release notes](https://github.com/syntax-tree/unist-util-visit/releases) - [Commits](syntax-tree/unist-util-visit@5.0.0...5.1.0) --- updated-dependencies: - dependency-name: unist-util-visit dependency-version: 5.1.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: doc ... Signed-off-by: dependabot[bot] <support@github.com> PR-URL: nodejs/node#61646 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This hides a discrepancy between OpenSSL and BoringSSL, as the latter returns lowercase hex values. Refs: nodejs/node#61459 (comment) PR-URL: nodejs/node#61752 Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#61572 Refs: nodejs/node#34220 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
The bit fields are declared as `bool` fields, yet are assigned integer values. PR-URL: nodejs/node#61425 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: nodejs/node#61775 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
PR-URL: nodejs/node#61750 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs/node#62492 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs/node#62456 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: nodejs/node#62395 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message: [wasm][exnref] Enable exnref R=mliedtke@chromium.org CC=ecmziegler@chromium.org Bug: 42204334 Change-Id: I0ddf1d29c936d73f7bb7909775a6bbd9a6ec5e2f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6458423 Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Matthias Liedtke <mliedtke@chromium.org> Cr-Commit-Position: refs/heads/main@{#99795} PR-URL: nodejs/node#62567 Refs: v8/v8@33e7739 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs/node#61785 Backport-PR-URL: nodejs/node#62586 Fixes: nodejs/node#61690 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs/node#60623 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: nodejs/node#61820 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This helps ensure that we already set the correct number of internal fields when creating objects, even if the number of internal fields of e.g. AsyncWrap changes over time. PR-URL: nodejs/node#62103 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: nodejs/node#62005 Fixes: nodejs/node#61724 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Using an internal field instead of a `v8::Global<>` removes an unnecessary memory leak footgun. This includes a test that demonstrates the issue, albeit using internal APIs. It's worth noting that if this PR is not accepted, we'd still be missing memory tracking for the `context_frame_` field, and we'd need to add it through our memory tracking API. PR-URL: nodejs/node#62103 Backport-PR-URL: nodejs/node#62357 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs/node#62261 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs/node#62483 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Remove the suggestion to use child_process.spawn() with the shell option set for running .bat and .cmd files on Windows. Passing arguments through spawn with shell: true is deprecated (DEP0190) due to shell injection risks. Keep the exec() and direct cmd.exe spawn alternatives. Fixes: nodejs/node#58735 PR-URL: nodejs/node#62243 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Notable changes: cli: * (SEMVER-MINOR) add --max-heap-size option (tannal) nodejs/node#58708 * add --require-module/--no-require-module (Joyee Cheung) nodejs/node#60959 crypto: * (SEMVER-MINOR) add raw key formats support to the KeyObject APIs (Filip Skokan) nodejs/node#62240 fs: * (SEMVER-MINOR) add `throwIfNoEntry` option for fs.stat and fs.promises.stat (Juan José) nodejs/node#61178 http2: * (SEMVER-MINOR) add http1Options for HTTP/1 fallback configuration (Amol Yadav) nodejs/node#61713 module: * mark require(esm) as stable (Joyee Cheung) nodejs/node#60959 * mark module compile cache as stable (Joyee Cheung) nodejs/node#60971 net: * (SEMVER-MINOR) add `setTOS` and `getTOS` to `Socket` (Amol Yadav) nodejs/node#61503 sqlite: * (SEMVER-MINOR) add limits property to DatabaseSync (Mert Can Altin) nodejs/node#61298 * mark as release candidate (Matteo Collina) nodejs/node#61262 src: * (SEMVER-MINOR) add C++ support for diagnostics channels (RafaelGSS) nodejs/node#61869 stream: * (SEMVER-MINOR) rename `Duplex.toWeb()` type option to `readableType` (René) nodejs/node#61632 test_runner: * add exports option for module mocks (sangwook) nodejs/node#61727 * (SEMVER-MINOR) expose worker ID for concurrent test execution (Ali Hassan) nodejs/node#61394 * (SEMVER-MINOR) show interrupted test on SIGINT (Matteo Collina) nodejs/node#61676 PR-URL: nodejs/node#62681
- tar: ^6.0.1 -> ^7.5.13 (fixes 6 HIGH CVEs) - uuid: ^8.3.0 -> ^14.0.0 (fixes GHSA-w5hq-g745-h8pq) Signed-off-by: Minwoo <nodecorelab@gmail.com>
PR-URL: nodejs/node#62216 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> PR-URL: #456 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: nodejs/node#62448 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #456 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: nodejs/node#62898 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> PR-URL: #456 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-04-15 Node.js v24.15.0 Krypton (LTS) Release Git-EVTag-v0-SHA512: 4bfd4c83c5d14860c3819f68c27d10fea3c50f2a2ac42b588b85a458c82c066fd108cc1ca50aa313cb4e6cb3c3e77792109c551e20e4329a517a7cc914599f0e
PR-URL: nodejs/node#62898 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> PR-URL: #456 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
To allow us to read the Build-Id from ELF headers in a specific binary.
75c8a88 to
3a3d59a
Compare
To allow us to read the Build-Id from ELF headers in a specific binary.
Summary by CodeRabbit
Chores
Tests