Closed Bug 1486027 Opened Last year Closed Last year

don't oom on failed ModuleGenerator memory reservations

Categories

(Core :: Javascript: WebAssembly, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: luke, Assigned: luke)

Details

Attachments

(1 file, 1 obsolete file)

To avoid realloc costs, ModuleGenerator performs some conservative (slightly over-sized) memory reservations, based on declarations in the ModuleEnvironment.  If these fail, however, we currently report oom when the actual compilation might succeed.  On 32-bit, we have one such case atm that succeeds when the masm.reserve() failure is ignored (151mb reserved, but only 112mb needed).
Attached patch fix-reservation (obsolete) — Splinter Review
Assignee: nobody → luke
Attachment #9003844 - Flags: review?(bbouvier)
Attached patch fix-reservationSplinter Review
Oops, that had some printf()s.
Attachment #9003844 - Attachment is obsolete: true
Attachment #9003844 - Flags: review?(bbouvier)
Attachment #9003845 - Flags: review?(bbouvier)
Comment on attachment 9003845 [details] [diff] [review]
fix-reservation

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

Ha, good catch.
Attachment #9003845 - Flags: review?(bbouvier) → review+
Pushed by lwagner@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b48d2197a9a0
don't oom on failed ModuleGenerator memory reservations (r=bbouvier)
https://hg.mozilla.org/mozilla-central/rev/b48d2197a9a0
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Depends on: 1516720
No longer depends on: 1516720
You need to log in before you can comment on or make changes to this bug.