LeaveFunction doesn't check outer_ale enough for OOM

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Paul Biggar, Assigned: Paul Biggar)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-in-tracemonkey])

Attachments

(1 attachment, 1 obsolete attachment)

1.31 KB, patch
jimb
: review+
Details | Diff | Splinter Review
(Assignee)

Description

6 years ago
Created attachment 536135 [details] [diff] [review]
fix

In LeaveFunction, outer_ale is checked a number of times, but the last one is not checked for OOM. Simple fix.
Attachment #536135 - Flags: review?(jimb)

Updated

6 years ago
Summary: LeaveFunction doesn't check outer_ole enough for OOM → LeaveFunction doesn't check outer_ale enough for OOM

Comment 1

6 years ago
Comment on attachment 536135 [details] [diff] [review]
fix

Review of attachment 536135 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsparse.cpp
@@ +2839,5 @@
>                   */
>                  outer_ale = MakePlaceholder(dn, tc);
>              }
>  
> +            if (!outer_ale)

Shouldn't this be just after the call to MakePlaceHolder? These checks should go right after the call that could fail.
(Assignee)

Comment 2

6 years ago
Created attachment 537582 [details] [diff] [review]
move the check
Assignee: general → pbiggar
Attachment #536135 - Attachment is obsolete: true
Attachment #536135 - Flags: review?(jimb)
Attachment #537582 - Flags: review?(jimb)

Updated

6 years ago
Attachment #537582 - Flags: review?(jimb) → review+
(Assignee)

Comment 3

6 years ago
http://hg.mozilla.org/tracemonkey/rev/cc612a118e7c
Whiteboard: [fixed-in-tracemonkey]
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/cc612a118e7c
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.