ensure OOM checks after PL_DHashTableInit

RESOLVED DUPLICATE of bug 211260

Status

()

Core
General
RESOLVED DUPLICATE of bug 211260
11 years ago
11 years ago

People

(Reporter: Robert Sayre, Assigned: Robert Sayre)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Comment 1

11 years ago
Created attachment 269272 [details] [diff] [review]
null out ops if Init fails, and check it before using

PL_DHashTableOperate shows up in a lot of stacks on crash-reports.mozilla.com.

At the very least, this patch prevents a known crasher in nsCSSRuleProcessor under OOM conditions (though the OOM crash just pops up elsewhere for that particular case).
Attachment #269272 - Flags: superreview?
Attachment #269272 - Flags: review?(dbaron)
(Assignee)

Updated

11 years ago
Attachment #269272 - Flags: superreview? → superreview?(cbiesinger)
(Assignee)

Comment 2

11 years ago
Created attachment 269274 [details] [diff] [review]
null out ops if Init fails, and check it before using v2

oops, attached the wrong patch before
Attachment #269272 - Attachment is obsolete: true
Attachment #269274 - Flags: superreview?
Attachment #269274 - Flags: review?(dbaron)
Attachment #269272 - Flags: superreview?(cbiesinger)
Attachment #269272 - Flags: review?(dbaron)
(Assignee)

Updated

11 years ago
Attachment #269274 - Flags: superreview? → superreview?(cbiesinger)
I think these need to be separate review requests for separate areas of code -- what the correct error handling is in each case requires understanding what the code does.  We're better off crashing than violating invariants in ways that could lead to exploitable security bugs.
(Assignee)

Comment 4

11 years ago
Comment on attachment 269274 [details] [diff] [review]
null out ops if Init fails, and check it before using v2

ok
Attachment #269274 - Flags: superreview?(cbiesinger)
Attachment #269274 - Flags: review?(dbaron)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 211260
You need to log in before you can comment on or make changes to this bug.