GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: migrate from deprecated SnapshotCreator constructor by joyeecheung · Pull Request #55337 · nodejs/node

Conversation

@joyeecheung

@joyeecheung joyeecheung commented Oct 9, 2024

Copy link
Copy Markdown
Member

Previously we have been using the variant of SnapshotCreator that only passes the external references instead of
v8::Isolate::CreateParams and it's about to be deprecated. Switch to using the new constructor that takes a fully CreateParams instead.

This also makes sure that the snapshot building script is using the Node.js array buffer allocator instead of a separate default one that was previously used by the old constructor. The zero fill toggle in the Node.js array buffer allocator would still be ignored during snapshot building, however, until we fixes the array buffer allocator and let V8 own the toggle backing store instead, because otherwise the snapshot would contain the external toggle address and become unreproducible.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Oct 9, 2024

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Oct 9, 2024
@joyeecheung joyeecheung added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. and removed c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Oct 9, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 9, 2024
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@codecov

codecov Bot commented Oct 9, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 87.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 90.24%. Comparing base (29af9ce) to head (b007f46).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/buffer.js 72.22% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #55337   +/-   ##
=======================================
  Coverage   90.24%   90.24%           
=======================================
  Files         630      630           
  Lines      185670   185688   +18     
  Branches    36405    36407    +2     
=======================================
+ Hits       167555   167574   +19     
  Misses      10998    10998           
+ Partials     7117     7116    -1     
Files with missing lines Coverage Δ
lib/internal/process/pre_execution.js 95.96% <ø> (+0.40%) ⬆️
src/api/embed_helpers.cc 75.98% <100.00%> (+1.36%) ⬆️
src/node_buffer.cc 67.20% <100.00%> (-0.31%) ⬇️
src/node_snapshotable.cc 75.52% <100.00%> (+0.13%) ⬆️
lib/internal/buffer.js 98.49% <72.22%> (-0.26%) ⬇️

... and 26 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas
legendecas approved these changes Oct 10, 2024
View reviewed changes
@legendecas legendecas added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Oct 10, 2024
@legendecas

legendecas commented Oct 10, 2024

Copy link
Copy Markdown
Member

I assume the labels were removed because of the awkward GitHub UI.

joyeecheung reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vmoroz
vmoroz reviewed Oct 14, 2024
View reviewed changes
Comment thread lib/internal/buffer.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

vmoroz
vmoroz approved these changes Oct 15, 2024
View reviewed changes
addaleax
addaleax approved these changes Oct 18, 2024
View reviewed changes
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 18, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 18, 2024
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@richardlau richardlau mentioned this pull request Oct 18, 2024
V8 13.0 Deprecations #55452
Closed
2 of 7 tasks
@joyeecheung

joyeecheung commented Oct 25, 2024

Copy link
Copy Markdown
Member Author

It seems the checksum of the read only snapshots are mismatched after the changes. Need to look into a bit..

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joyeecheung joyeecheung added the blocked PRs that are blocked by other issues or PRs. label Oct 25, 2024
@joyeecheung joyeecheung mentioned this pull request Apr 10, 2025
[help wanted] deps: update V8 to 13.6 #57753
Closed
@joyeecheung
joyeecheung force-pushed the snapshot-params branch from 4968db1 to 494669b Compare April 12, 2025 18:17
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 12, 2025
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 12, 2025
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@joyeecheung joyeecheung added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. and removed blocked PRs that are blocked by other issues or PRs. labels Apr 12, 2025
@github-actions github-actions Bot added request-ci-failed Starting CI with the request-ci label failed and requires manual intervention. and removed request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Apr 12, 2025
@github-actions

github-actions Bot commented Apr 12, 2025

Copy link
Copy Markdown
Contributor
Failed to start CI
   ⚠  Commits were pushed since the last approving review:
   ⚠  - src: migrate from deprecated SnapshotCreator constructor
   ⚠  - fixup! src: migrate from deprecated SnapshotCreator constructor
   ✘  Refusing to run CI on potentially unsafe PR
https://github.com/nodejs/node/actions/runs/14424311872
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@joyeecheung joyeecheung removed the request-ci-failed Starting CI with the request-ci label failed and requires manual intervention. label Apr 13, 2025
joyeecheung added 2 commits April 14, 2025 13:34
@joyeecheung
src: migrate from deprecated SnapshotCreator constructor
7a4984f
Previously we have been using the variant of SnapshotCreator that
only passes the external references instead of
v8::Isolate::CreateParams and it's about to be deprecated.
Switch to using the new constructor that takes a fully CreateParams
instead.

This also makes sure that the snapshot building script is using
the Node.js array buffer allocator instead of a separate default
one that was previously used by the old constructor. The zero fill
toggle in the Node.js array buffer allocator would still be ignored
during snapshot building, however, until we fixes the array buffer
allocator and let V8 own the toggle backing store instead, because
otherwise the snapshot would contain the external toggle address
and become unreproducible.
@joyeecheung
fixup! src: migrate from deprecated SnapshotCreator constructor
b007f46
@joyeecheung
joyeecheung force-pushed the snapshot-params branch from 1e4871c to b007f46 Compare April 14, 2025 12:07
@nodejs-github-bot

This comment was marked as outdated.

Sign in to view
@joyeecheung joyeecheung added dont-land-on-v18.x dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. labels Apr 14, 2025
jasnell
jasnell approved these changes Apr 14, 2025
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Apr 14, 2025 •
edited by jasnell
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/66265/ 💛

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell pushed a commit that referenced this pull request Apr 14, 2025
@joyeecheung @jasnell
src: migrate from deprecated SnapshotCreator constructor
b2405e9
Previously we have been using the variant of SnapshotCreator that
only passes the external references instead of
v8::Isolate::CreateParams and it's about to be deprecated.
Switch to using the new constructor that takes a fully CreateParams
instead.

This also makes sure that the snapshot building script is using
the Node.js array buffer allocator instead of a separate default
one that was previously used by the old constructor. The zero fill
toggle in the Node.js array buffer allocator would still be ignored
during snapshot building, however, until we fixes the array buffer
allocator and let V8 own the toggle backing store instead, because
otherwise the snapshot would contain the external toggle address
and become unreproducible.

PR-URL: #55337
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Vladimir Morozov <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@jasnell

jasnell commented Apr 14, 2025

Copy link
Copy Markdown
Member

Landed in b2405e9

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell jasnell closed this Apr 14, 2025
RafaelGSS pushed a commit that referenced this pull request May 1, 2025
@joyeecheung @RafaelGSS
src: migrate from deprecated SnapshotCreator constructor
959827a
Previously we have been using the variant of SnapshotCreator that
only passes the external references instead of
v8::Isolate::CreateParams and it's about to be deprecated.
Switch to using the new constructor that takes a fully CreateParams
instead.

This also makes sure that the snapshot building script is using
the Node.js array buffer allocator instead of a separate default
one that was previously used by the old constructor. The zero fill
toggle in the Node.js array buffer allocator would still be ignored
during snapshot building, however, until we fixes the array buffer
allocator and let V8 own the toggle backing store instead, because
otherwise the snapshot would contain the external toggle address
and become unreproducible.

PR-URL: #55337
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Vladimir Morozov <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request May 1, 2025
2025-05-06, Version 24.0.0 (Current) #57609
Merged
RafaelGSS pushed a commit that referenced this pull request May 2, 2025
@joyeecheung @RafaelGSS
src: migrate from deprecated SnapshotCreator constructor
fded233
Previously we have been using the variant of SnapshotCreator that
only passes the external references instead of
v8::Isolate::CreateParams and it's about to be deprecated.
Switch to using the new constructor that takes a fully CreateParams
instead.

This also makes sure that the snapshot building script is using
the Node.js array buffer allocator instead of a separate default
one that was previously used by the old constructor. The zero fill
toggle in the Node.js array buffer allocator would still be ignored
during snapshot building, however, until we fixes the array buffer
allocator and let V8 own the toggle backing store instead, because
otherwise the snapshot would contain the external toggle address
and become unreproducible.

PR-URL: #55337
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Vladimir Morozov <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
ChALkeR
ChALkeR reviewed Oct 27, 2025
View reviewed changes
Comment thread lib/internal/buffer.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ChALkeR ChALkeR mentioned this pull request Oct 27, 2025
allocUnsafe is useless since 24 #60423
Closed
@ChALkeR

ChALkeR commented Oct 27, 2025

Copy link
Copy Markdown
Member

I checked the following:

  • 4968db1de4c560088de27d84543af9f029217321 zero-fills allocUnsafe, 4968db1^ doesn't

  • 494669b2f2a22cd9aa351e42dfec06b2d8e68cd1 zero-fills allocUnsafe, 494669b^ doesn't

  • 1e4871cfb173da9543045fe9d8dbbf6a4fe14799 zero-fills allocUnsafe, 1e4871c^ too, 1e4871c^^ doesn't

  • b2405e9 zero-fills allocUnsafe, b2405e9^ doesn't

b2405e9 was landed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codebytere codebytere mentioned this pull request Sep 4, 2026
src: stop leaking a CppHeap in CommonEnvironmentSetup #65792
Merged
nodejs-github-bot pushed a commit that referenced this pull request Sep 7, 2026
@codebytere
src: stop leaking a CppHeap in CommonEnvironmentSetup
8e4d830
`CommonEnvironmentSetup` created a `CppHeap` for its `CreateParams`
before deciding how to create the isolate, but `NewIsolate()` ignores
`params->cpp_heap` and attaches a heap of its own (or the one from
`IsolateSettings`). The first heap was never attached or destroyed, so
every non-snapshotting setup leaked one `CppHeap`; cppgc's heap
registry keeps it reachable, which is why LSAN stays quiet about it.

Only create the heap on the snapshotting path, where the params go to
the `SnapshotCreator` directly.

Refs: #55337
Signed-off-by: Shelley Vohr <[email protected]>
PR-URL: #65792
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 16, 2026
@codebytere @aduh95
src: stop leaking a CppHeap in CommonEnvironmentSetup
48158fb
`CommonEnvironmentSetup` created a `CppHeap` for its `CreateParams`
before deciding how to create the isolate, but `NewIsolate()` ignores
`params->cpp_heap` and attaches a heap of its own (or the one from
`IsolateSettings`). The first heap was never attached or destroyed, so
every non-snapshotting setup leaked one `CppHeap`; cppgc's heap
registry keeps it reachable, which is why LSAN stays quiet about it.

Only create the heap on the snapshotting path, where the params go to
the `SnapshotCreator` directly.

Refs: #55337
Signed-off-by: Shelley Vohr <[email protected]>
PR-URL: #65792
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 22, 2026
@codebytere @aduh95
src: stop leaking a CppHeap in CommonEnvironmentSetup
7331f5c
`CommonEnvironmentSetup` created a `CppHeap` for its `CreateParams`
before deciding how to create the isolate, but `NewIsolate()` ignores
`params->cpp_heap` and attaches a heap of its own (or the one from
`IsolateSettings`). The first heap was never attached or destroyed, so
every non-snapshotting setup leaked one `CppHeap`; cppgc's heap
registry keeps it reachable, which is why LSAN stays quiet about it.

Only create the heap on the snapshotting path, where the params go to
the `SnapshotCreator` directly.

Refs: #55337
Signed-off-by: Shelley Vohr <[email protected]>
PR-URL: #65792
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ChALkeR ChALkeR ChALkeR left review comments
@jasnell jasnell jasnell approved these changes
@addaleax addaleax addaleax approved these changes
@vmoroz vmoroz vmoroz approved these changes
@legendecas legendecas legendecas approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@joyeecheung @nodejs-github-bot @legendecas @jasnell @ChALkeR @addaleax @vmoroz
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.