Skip to content

src: fix vm bug for configurable globalThis - #51602

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
fhinkel:vm-configurable-not-writable
Feb 1, 2024
Merged

src: fix vm bug for configurable globalThis#51602
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
fhinkel:vm-configurable-not-writable

Conversation

@fhinkel

Copy link
Copy Markdown
Member

Object.defineProperty allows to change the value for non-writable properties if they are configurable. We missed that case in the vm module when checking if a property is read-only.

Fixes: #47799

cc @domenic

@fhinkelfhinkel self-assigned this Jan 30, 2024
@nodejs-github-botnodejs-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. vm Issues and PRs related to the vm subsystem. labels Jan 30, 2024
@fhinkel
fhinkelforce-pushed the vm-configurable-not-writable branch from a876259 to bf79653CompareJanuary 30, 2024 00:54
@fhinkelfhinkel added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

@fhinkel
fhinkel requested a review from mcollinaJanuary 30, 2024 02:10

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aduh95aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 30, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

Object.defineProperty allows to change the value for
non-writable properties if they are configurable. We
missed that case when checking if a
property is read-only.
Fixes: nodejs#47799
@fhinkel
fhinkelforce-pushed the vm-configurable-not-writable branch from 2510adc to d69a04dCompareJanuary 31, 2024 16:10
@fhinkelfhinkel added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 31, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 31, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

@fhinkelfhinkel added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 1, 2024
@nodejs-github-botnodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Feb 1, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/51602
✔ Done loading data for nodejs/node/pull/51602
----------------------------------- PR info ------------------------------------
Title src: fix vm bug for configurable globalThis (#51602)
Author F. Hinkelmann (@fhinkel)
Branch fhinkel:vm-configurable-not-writable -> nodejs:main
Labels c++, vm, author ready, needs-ci
Commits 1
- src: fix vm bug for configurable globalThis
Committers 1
- Franziska Hinkelmann PR-URL: https://github.com/nodejs/node/pull/51602
Fixes: https://github.com/nodejs/node/issues/47799
Reviewed-By: Matteo Collina Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca ------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/51602
Fixes: https://github.com/nodejs/node/issues/47799
Reviewed-By: Matteo Collina Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca --------------------------------------------------------------------------------
⚠ Commits were pushed since the last approving review:
⚠ - src: fix vm bug for configurable globalThis
ℹ This PR was created on Tue, 30 Jan 2024 00:34:38 GMT
✔ Approvals: 3
✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/51602#pullrequestreview-1850401295
✔ - Michaël Zasso (@targos) (TSC): https://github.com/nodejs/node/pull/51602#pullrequestreview-1850404038
✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/51602#pullrequestreview-1852297658
✔ Last GitHub CI successful
ℹ Last Full PR CI on 2024-01-31T20:17:51Z: https://ci.nodejs.org/job/node-test-pull-request/56994/
- Querying data for job/node-test-pull-request/56994/
✔ Last Jenkins CI successful
--------------------------------------------------------------------------------
✔ Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/7734474109

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollinamcollina added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Feb 1, 2024
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 1, 2024
@nodejs-github-bot
nodejs-github-bot merged commit 1cd9a95 into nodejs:mainFeb 1, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 1cd9a95

@fhinkel
fhinkel deleted the vm-configurable-not-writable branch February 1, 2024 13:30
rdw-msft pushed a commit to rdw-msft/node that referenced this pull request Feb 9, 2024
Object.defineProperty allows to change the value for
non-writable properties if they are configurable. We
missed that case when checking if a
property is read-only.
Fixes: nodejs#47799
PR-URL: nodejs#51602
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Feb 15, 2024
Object.defineProperty allows to change the value for
non-writable properties if they are configurable. We
missed that case when checking if a
property is read-only.
Fixes: #47799
PR-URL: #51602
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@marco-ippolitomarco-ippolito mentioned this pull request Mar 1, 2024
richardlau pushed a commit that referenced this pull request Mar 25, 2024
Object.defineProperty allows to change the value for
non-writable properties if they are configurable. We
missed that case when checking if a
property is read-only.
Fixes: #47799
PR-URL: #51602
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@richardlaurichardlau mentioned this pull request Mar 25, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.needs-ciPRs that need a full CI run.vmIssues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot redefine a property on vm's globalThis

6 participants

@fhinkel@nodejs-github-bot@mcollina@lpinca@targos@aduh95