Skip to content

src: fix startup snapshot reproducibility of InternalFieldInfo - #65684

Open
legendecas wants to merge 1 commit into
nodejs:mainfrom
legendecas:snapshot-repro
Open

src: fix startup snapshot reproducibility of InternalFieldInfo#65684
legendecas wants to merge 1 commit into
nodejs:mainfrom
legendecas:snapshot-repro

Conversation

@legendecas

Copy link
Copy Markdown
Member

memset before a placement new can be optimized away by GCC due to
lifetime analysis. This causes the buffer in the startup snapshot
vulnerable to ASLR.

Fixes: #65508

@nodejs-github-bot

nodejs-github-bot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup
  • @nodejs/cpp-reviewers

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Aug 31, 2026
@legendecas legendecas added the snapshot Issues and PRs related to the startup snapshot. label Aug 31, 2026
@legendecas
legendecas requested a review from joyeecheung August 31, 2026 15:10
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.06%. Comparing base (f9ab994) to head (4be2193).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65684      +/-   ##
==========================================
- Coverage   90.07%   90.06%   -0.01%     
==========================================
  Files         754      754              
  Lines      256395   256395              
  Branches    48494    48495       +1     
==========================================
- Hits       230947   230926      -21     
- Misses      16563    16586      +23     
+ Partials     8885     8883       -2     
Files with missing lines Coverage Δ
src/node_snapshotable.h 100.00% <100.00%> (ø)

... and 29 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 request-ci Add this label to start a Jenkins CI on a PR. and removed request-ci Add this label to start a Jenkins CI on a PR. labels Sep 1, 2026
@joyeecheung

Copy link
Copy Markdown
Member

It's not clear how but there is a fs test failing across Linux. Maybe it needs a rebase?

`memset` before a placement `new` can be optimized away by GCC due to
lifetime analysis. This causes the buffer in the startup snapshot
vulnerable to ASLR.

Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
@legendecas

Copy link
Copy Markdown
Member Author

Right, I don't think the CI failures on fs were related. Rebased.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. snapshot Issues and PRs related to the startup snapshot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libnode unreproducible

3 participants