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

[v16.x backport] src,inspector: fix empty MaybeLocal crash #42967

Conversation

Dossar
Copy link

@Dossar Dossar commented May 4, 2022

Based off of #42409 to backport into node 16. Below credit of RaisinTen

Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.
Fixes: #42407
Signed-off-by: Darshan Sen raisinten@gmail.com

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol needs-ci PRs that need a full CI run. v16.x labels May 4, 2022
@Dossar
Copy link
Author

Dossar commented May 4, 2022

@danielleadams I see you're working on v16.15.1 -- this would be a good candidate to backport as well, as it fixes a breaking bug I've found in nightwatch 2.x

@richardlau
Copy link
Member

Please include #42720. The test added in #42409 destabilized the CI.

@Dossar
Copy link
Author

Dossar commented May 5, 2022

Please include #42720. The test added in #42409 destabilized the CI.

Done!

@aduh95 aduh95 changed the title src,inspector: fix empty MaybeLocal crash (backport to node 16) [v16.x backport] src,inspector: fix empty MaybeLocal crash May 5, 2022
@aduh95
Copy link
Contributor

aduh95 commented May 5, 2022

Can you cherry-pick the original commit that landed on master, so the git author and the full commit message is preserved please?

Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: nodejs#42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: nodejs#42409
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Dossar Dossar force-pushed the src,inspector/fix-empty-MaybeLocal-crash branch from 894897c to 730d294 Compare May 26, 2022 12:45
It was disconnecting the runners from the CI server. Not worth having a
resource-intensive test for this kind of an edge cases.

Fixes: nodejs#42719
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: nodejs#42720
Fixes: nodejs#42719
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@Dossar Dossar force-pushed the src,inspector/fix-empty-MaybeLocal-crash branch from 730d294 to bbd5fe6 Compare May 26, 2022 12:48
@Dossar
Copy link
Author

Dossar commented May 26, 2022

@richardlau @aduh95 apologies for the delay, I've cherrypicked the commits mentioned.

Commit 97c442a: cherrypicked from be01185
Commit bbd5fe6: cherrypicked from 19064be

@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label May 26, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 26, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@BethGriggs BethGriggs changed the base branch from v16.x to v16.x-staging May 31, 2022 09:58
juanarbol pushed a commit that referenced this pull request May 31, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: #42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: #42409
Backport--PR-URL: #42967
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
juanarbol pushed a commit that referenced this pull request Jun 1, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: #42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: #42409
Backport-PR-URL: #42967
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
juanarbol pushed a commit that referenced this pull request Jun 1, 2022
It was disconnecting the runners from the CI server. Not worth having a
resource-intensive test for this kind of an edge cases.

Fixes: #42719
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: #42720
Backport-PR-URL: #42967
Fixes: #42719
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@juanarbol
Copy link
Member

This is amazing! Thanks for the help; your first PR goes to an LTS release :shipit:

Landed in 933d9ca...4fd90f1 🎉 💚

@juanarbol juanarbol closed this Jun 1, 2022
BethGriggs pushed a commit that referenced this pull request Jun 1, 2022
Return early when the Inspector StringView to V8 String conversion fails
and returns an empty MaybeLocal instead of running the invalid
ToLocalChecked() assertion.

Fixes: #42407
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: #42409
Backport-PR-URL: #42967
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs pushed a commit that referenced this pull request Jun 1, 2022
It was disconnecting the runners from the CI server. Not worth having a
resource-intensive test for this kind of an edge cases.

Fixes: #42719
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: #42720
Backport-PR-URL: #42967
Fixes: #42719
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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++. inspector Issues and PRs related to the V8 inspector protocol needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants