Closed
Bug 284889
Opened 20 years ago
Closed 19 years ago
OOM crash [@nsStyleContext::ApplyStyleFixups]
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dewildt, Assigned: bastiaan)
Details
(Keywords: crash, helpwanted)
Crash Data
Attachments
(2 files, 2 obsolete files)
3.62 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
995 bytes,
patch
|
benjamin
:
approval1.8b4+
|
Details | Diff | Splinter Review |
GetUniqueStyleData could return nsnull is several cases (e.g. invalid
nsStyleStructID, OOM etc.). This is not handled in
nsStyleContext::ApplyStyleFixups which could result in a crash
Comment 1•20 years ago
|
||
Hmmmm... We really need this fixup -- if it doesn't happen, we'll crash in
various places in layout, iirc. Maybe if getting the unique style data fails we
should just munge our non-unique data?
Keywords: helpwanted
Assignee | ||
Comment 2•19 years ago
|
||
This patch adds a null check. I don't completely understand bz's comment, so
his suggested additional fix is lost upon me.
Assignee | ||
Updated•19 years ago
|
Attachment #187730 -
Flags: review?(dbaron)
Comment 3•19 years ago
|
||
My comment just says that with that patch we'll go on to crash elsewhere instead
of crashing here.
My suggestion is that if we fail to get a unique style data we should perhaps
modify |disp| (or rather a non-const version thereof) directly. Possibly by
making GetUniqueStyleData never return null and return the non-unique data if it
can't allocate a new struct.
Assignee | ||
Updated•19 years ago
|
Attachment #187730 -
Flags: review?(dbaron)
Assignee | ||
Comment 4•19 years ago
|
||
Attachment #187730 -
Attachment is obsolete: true
Assignee | ||
Comment 5•19 years ago
|
||
On second thought, we should probably return immediately.
Assignee | ||
Updated•19 years ago
|
Assignee: dbaron → b.jacques
Attachment #188117 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Updated•19 years ago
|
Attachment #188120 -
Flags: superreview?(dbaron)
Attachment #188120 -
Flags: review?(dbaron)
Comment on attachment 188120 [details] [diff] [review]
even better fix..
>+ NS_WARNING("Ran out of memory while trying to allocate memory for a unique nsStyleStruct! " \
>+ "Returning the non-unique data.");
No need for the backslash. It may even be counterproductive.
Attachment #188120 -
Flags: superreview?(dbaron)
Attachment #188120 -
Flags: superreview+
Attachment #188120 -
Flags: review?(dbaron)
Attachment #188120 -
Flags: review+
Assignee | ||
Comment 7•19 years ago
|
||
Attachment #188120 -
Attachment is obsolete: true
Attachment #189720 -
Flags: approval1.8b4?
Comment 8•19 years ago
|
||
Comment on attachment 188120 [details] [diff] [review]
even better fix..
Requesting 1.8b4 approval for this OOM error handling fix. Risk is quite low.
Attachment #188120 -
Attachment is obsolete: false
Attachment #188120 -
Flags: approval1.8b4?
Updated•19 years ago
|
Attachment #188120 -
Flags: approval1.8b4?
Updated•19 years ago
|
Attachment #189720 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 9•19 years ago
|
||
Checked in by timeless (2005-07-19 14:03).
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Crash Signature: [@nsStyleContext::ApplyStyleFixups]
You need to log in
before you can comment on or make changes to this bug.
Description
•