Conversation
himself65
requested changes
Mar 18, 2020
src/udp_wrap.cc
Outdated
Comment on lines
519
to
521
Member
There was a problem hiding this comment.
Suggested change
| MaybeLocal<Value> maybe_chunk = chunks->Get(env->context(), i); | |
| if (maybe_chunk.IsEmpty()) return; | |
| Local<Value> chunk = maybe_chunk.ToLocalChecked(); | |
| Local<Value> chunk; | |
| if (!chunks->Get(env->context(), i).ToLocal(&chunk)) | |
| return; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Contributor
Author
There was a problem hiding this comment.
Not really sure about the value added by a test on this really really edge case.
Using ToLocalChecked on MaybeLocal without verifying it's empty can lead to unattempted crash.
targos
approved these changes
Mar 18, 2020
cjihrig
approved these changes
Mar 18, 2020
devnexen
approved these changes
Mar 18, 2020
addaleax
approved these changes
Mar 20, 2020
Collaborator
jasnell
approved these changes
Mar 21, 2020
Collaborator
addaleax
pushed a commit
that referenced
this pull request
Mar 27, 2020
Using ToLocalChecked on MaybeLocal without verifying it's empty can lead to unattempted crash. PR-URL: #32339 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Member
|
Landed in 191fb3c, thanks for the PR! 🎉 |
addaleax
pushed a commit
that referenced
this pull request
Mar 30, 2020
Using ToLocalChecked on MaybeLocal without verifying it's empty can lead to unattempted crash. PR-URL: #32339 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Apr 22, 2020
Using ToLocalChecked on MaybeLocal without verifying it's empty can lead to unattempted crash. PR-URL: #32339 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or 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
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.
Using ToLocalChecked on MaybeLocal without verify it's empty can lead to unattempted crash.
Before the change: this code leads Node.js to crash with C++ fatal error.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes