-
Notifications
You must be signed in to change notification settings - Fork 30k
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
deps: backport IsValid changes from 4e8736d in V8 (v4.x) #6669
Conversation
V8 erroneously did null pointer checks on `this`. It can lead to a SIGSEGV crash if node is compiled with GCC 6. Backport relevant changes from [1] that fix this issue. [1]: https://codereview.chromium.org/1900423002 Fixes: nodejs#6272
@@ -869,6 +869,8 @@ class FrameStateDescriptor : public ZoneObject { | |||
MaybeHandle<SharedFunctionInfo> shared_info, | |||
FrameStateDescriptor* outer_state = nullptr); | |||
|
|||
static size_t GetTotalSize(FrameStateDescriptor* desc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const FrameStateDescriptor*
?
EDIT: Existing V8 code plays fast and loose with const correctness so I suppose it doesn't matter too much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
Sounds like a good idea. |
CI is green @bnoordhuis is there anything else for you to give an LGTM? |
|
||
size_t FrameStateDescriptor::GetTotalSize() const { | ||
size_t FrameStateDescriptor::GetTotalSize(const FrameStateDescriptor* desc) { | ||
if (desc == NULL) return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This nullptr check is not strictly necessary. Same for the corresponding checks in the other methods.
@bnoordhuis I addressed your comments, PTAL. |
LGTM |
1 similar comment
LGTM |
V8 erroneously did null pointer checks on `this`. It can lead to a SIGSEGV crash if node is compiled with GCC 6. Backport relevant changes from [1] that fix this issue. [1]: https://codereview.chromium.org/1900423002 Fixes: #6272 PR-URL: #6669 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
fix null pointer checks in V8's FrameStateDescriptor PR-URL: #6669 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
landed in 53d33a4...14013d8 |
V8 erroneously did null pointer checks on `this`. It can lead to a SIGSEGV crash if node is compiled with GCC 6. Backport relevant changes from [1] that fix this issue. [1]: https://codereview.chromium.org/1900423002 Fixes: #6272 PR-URL: #6669 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
fix null pointer checks in V8's FrameStateDescriptor PR-URL: #6669 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
V8 erroneously did null pointer checks on `this`. It can lead to a SIGSEGV crash if node is compiled with GCC 6. Backport relevant changes from [1] that fix this issue. [1]: https://codereview.chromium.org/1900423002 Fixes: nodejs/node#6272 PR-URL: nodejs/node#6669 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
fix null pointer checks in V8's FrameStateDescriptor PR-URL: nodejs/node#6669 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
Affected core subsystem(s)
v8
Description of change
Cherry-pick changes from #6544 to
v4.x-staging
.I added another commit to make a similar fix to
FrameStateDescriptor::GetTotalSize
(some of our tests were crashing before it). The tests now pass but I could also changeGetFrameCount
andGetJSFrameCount
for more safety ?R= @bnoordhuis
CC @nodejs/v8