Add OOM Handling assertions to Sprinter
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
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 | ||
Updated•11 months ago
|
Assignee | ||
Updated•11 months ago
|
Assignee | ||
Comment 1•11 months ago
|
||
(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.
Assignee | ||
Comment 2•11 months ago
|
||
Comment 3•10 months ago
|
||
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.
Assignee | ||
Updated•10 months ago
|
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
Comment 5•10 months ago
|
||
bugherder |
Description
•