Skip to content
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

src: fix vm bug for configurable globalThis #51602

Merged

Conversation

fhinkel
Copy link
Member

@fhinkel fhinkel commented Jan 30, 2024

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

@fhinkel fhinkel self-assigned this Jan 30, 2024
@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. vm Issues and PRs related to the vm subsystem. labels Jan 30, 2024
@fhinkel fhinkel force-pushed the vm-configurable-not-writable branch from a876259 to bf79653 Compare January 30, 2024 00:54
@fhinkel fhinkel added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 30, 2024
@nodejs-github-bot
Copy link
Collaborator

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

@fhinkel fhinkel requested a review from mcollina January 30, 2024 02:10
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@aduh95 aduh95 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
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 fhinkel force-pushed the vm-configurable-not-writable branch from 2510adc to d69a04d Compare January 31, 2024 16:10
@fhinkel fhinkel added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 31, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 31, 2024
@nodejs-github-bot
Copy link
Collaborator

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

@nodejs-github-bot
Copy link
Collaborator

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

@fhinkel fhinkel added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 1, 2024
@nodejs-github-bot nodejs-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
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

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina 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-bot nodejs-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:main Feb 1, 2024
61 checks passed
@nodejs-github-bot
Copy link
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-ippolito pushed a commit to marco-ippolito/node that referenced this pull request Feb 19, 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>
@marco-ippolito marco-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>
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>
@richardlau richardlau mentioned this pull request Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs 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-ci PRs that need a full CI run. vm Issues 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