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

`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>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup

@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 (a382c1c) to head (66783ae).
⚠️ Report is 43 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65684      +/-   ##
==========================================
- Coverage   90.07%   90.06%   -0.01%     
==========================================
  Files         751      754       +3     
  Lines      254986   256369    +1383     
  Branches    48147    48490     +343     
==========================================
+ Hits       229681   230909    +1228     
- Misses      16492    16570      +78     
- Partials     8813     8890      +77     
Files with missing lines Coverage Δ
src/node_snapshotable.h 100.00% <100.00%> (ø)

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

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

2 participants