Closed Bug 1836082 Opened 11 months ago Closed 10 months ago

Add OOM Handling assertions to Sprinter

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: mgaudet, Assigned: nbp)

References

Details

Attachments

(1 file)

"How about adding assertion to Sprinter::{string,stringEnd,release,stringAt,operator[]} and all other methods that accesses the resulting string, to check if Sprinter::hadOutOfMemory is called, depending on Sprinter::shouldReportOOM?
So that it's guaranteed that OOM check is always performed for non-error case."

from https://phabricator.services.mozilla.com/D179477#inline-994670

Assignee: nobody → nicolas.b.pierron
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P1

(In reply to Matthew Gaudet (he/him) [:mgaudet] from comment #0)

"How about adding assertion to Sprinter::{string,stringEnd,release,stringAt,operator[]} and all other methods that accesses the resulting string, to check if Sprinter::hadOutOfMemory is called, depending on Sprinter::shouldReportOOM?
So that it's guaranteed that OOM check is always performed for non-error case."

I am not sure to understand the need for shouldReportOOM, which reports the fact that the JSCotnext would be used to report the allocation failure.

In all cases, accessors should be forbidden access if any OOM happened before.

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:nbp, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(nicolas.b.pierron)
Flags: needinfo?(mgaudet)
Flags: needinfo?(nicolas.b.pierron)
Flags: needinfo?(mgaudet)
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1f44bd42ebc2
Verify that we never access strings content after a OOM had been reported. r=mgaudet
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: