-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib: account for cwd access from snapshot serialization cb #51901
Merged
nodejs-github-bot
merged 1 commit into
nodejs:main
from
addaleax:snapshot-cwd-accessed-from-inside-serialize-callback
Feb 29, 2024
Merged
lib: account for cwd access from snapshot serialization cb #51901
nodejs-github-bot
merged 1 commit into
nodejs:main
from
addaleax:snapshot-cwd-accessed-from-inside-serialize-callback
Feb 29, 2024
Conversation
This file contains 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
Functions registered with `addSerializeCallback()` can access and call `process.cwd()`. b7d836e accounted for the fact that it is necessary to reset the cwd cache after the snapshot builder script has run, but did not account for possible accesses from serialization callbacks. To properly account for these, add a deserialization callback as well. As a related drive-by fix, also mention the execution order of callbacks in the documentation. Refs: nodejs#49684
Review requested:
|
nodejs-github-bot
added
lib / src
Issues and PRs related to general changes in the lib or src directory.
needs-ci
PRs that need a full CI run.
labels
Feb 27, 2024
joyeecheung
approved these changes
Feb 27, 2024
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Feb 27, 2024
targos
approved these changes
Feb 28, 2024
addaleax
added
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Feb 28, 2024
marco-ippolito
approved these changes
Feb 28, 2024
nodejs-github-bot
removed
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Feb 29, 2024
Landed in 40565e9 |
marco-ippolito
pushed a commit
that referenced
this pull request
Mar 1, 2024
Functions registered with `addSerializeCallback()` can access and call `process.cwd()`. b7d836e accounted for the fact that it is necessary to reset the cwd cache after the snapshot builder script has run, but did not account for possible accesses from serialization callbacks. To properly account for these, add a deserialization callback as well. As a related drive-by fix, also mention the execution order of callbacks in the documentation. Refs: #49684 PR-URL: #51901 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
Merged
addaleax
deleted the
snapshot-cwd-accessed-from-inside-serialize-callback
branch
March 1, 2024 13:10
richardlau
pushed a commit
that referenced
this pull request
Mar 25, 2024
Functions registered with `addSerializeCallback()` can access and call `process.cwd()`. b7d836e accounted for the fact that it is necessary to reset the cwd cache after the snapshot builder script has run, but did not account for possible accesses from serialization callbacks. To properly account for these, add a deserialization callback as well. As a related drive-by fix, also mention the execution order of callbacks in the documentation. Refs: #49684 PR-URL: #51901 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
richardlau
pushed a commit
that referenced
this pull request
Mar 25, 2024
Functions registered with `addSerializeCallback()` can access and call `process.cwd()`. b7d836e accounted for the fact that it is necessary to reset the cwd cache after the snapshot builder script has run, but did not account for possible accesses from serialization callbacks. To properly account for these, add a deserialization callback as well. As a related drive-by fix, also mention the execution order of callbacks in the documentation. Refs: #49684 PR-URL: #51901 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
Merged
rdw-msft
pushed a commit
to rdw-msft/node
that referenced
this pull request
Mar 26, 2024
Functions registered with `addSerializeCallback()` can access and call `process.cwd()`. b7d836e accounted for the fact that it is necessary to reset the cwd cache after the snapshot builder script has run, but did not account for possible accesses from serialization callbacks. To properly account for these, add a deserialization callback as well. As a related drive-by fix, also mention the execution order of callbacks in the documentation. Refs: nodejs#49684 PR-URL: nodejs#51901 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Marco Ippolito <[email protected]>
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.
Functions registered with
addSerializeCallback()
can access and callprocess.cwd()
. b7d836e accounted for the fact that it is necessary to reset the cwd cache after the snapshot builder script has run, but did not account for possible accesses from serialization callbacks. To properly account for these, add a deserialization callback as well.As a related drive-by fix, also mention the execution order of callbacks in the documentation.
Refs: #49684