Closed
Bug 502687
Opened 15 years ago
Closed 15 years ago
GCGraphBuilder::AddNode crashes on OOM
Categories
(Core :: XPCOM, defect, P2)
Core
XPCOM
Tracking
()
VERIFIED
FIXED
mozilla1.9.2
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
blocking1.9.1 | --- | .8+ |
status1.9.1 | --- | .8-fixed |
People
(Reporter: mrbkap, Assigned: mrbkap)
References
Details
(Keywords: verified1.9.0.18, verified1.9.1, verified1.9.2)
Attachments
(1 file)
895 bytes,
patch
|
dbaron
:
review+
dveditz
:
approval1.9.1.8+
dveditz
:
approval1.9.0.18+
|
Details | Diff | Splinter Review |
The code looks like:
PtrToNodeEntry *e = static_cast<PtrToNodeEntry*>(PL_DHashTableOperate(&mPtrToNodeMap, s, PL_DHASH_ADD));
PtrInfo *result;
if (!e->mNode) {
but PL_DHASH_ADD returns NULL on OOM. The function already returns null in some cases, so callers should be mostly null safe. dbaron thinks that failure to add a node should result in leaks (as opposed to overreleasing).
Assignee | ||
Comment 1•15 years ago
|
||
I don't know how to test for this, but it does compile!
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #387035 -
Flags: superreview?(dbaron)
Attachment #387035 -
Flags: review?(dbaron)
Comment on attachment 387035 [details] [diff] [review]
Proposed fix
r=dbaron
Attachment #387035 -
Flags: superreview?(dbaron)
Attachment #387035 -
Flags: review?(dbaron)
Attachment #387035 -
Flags: review+
Assignee | ||
Comment 3•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 4•15 years ago
|
||
(In reply to comment #0)
> dbaron thinks that failure to add
> a node should result in leaks (as opposed to overreleasing).
I'm not convinced that that's true, XPConnect relies on the cycle collector traversing all of the XPConnect objects holding JS things. If we fail to add any of those, they will not get marked (whether they're live or not) and will be finalized. Something needs to signal this failure to XPConnect, so that it just marks all the JS things held by XPConnect objects. See also bug 460916.
Comment 5•15 years ago
|
||
Actually, this might be fine. The key is that we won't try to unlink the XPConnect objects, so they will all mark their JS object after CC.
Comment 7•15 years ago
|
||
We should take this on branches, we've sometimes seen this cause crashes with the testcase in bug 533000 (the testcase probably triggers it faster because it manages to use up much more memory quickly).
blocking1.9.1: --- → ?
Flags: blocking1.9.2?
Updated•15 years ago
|
Attachment #387035 -
Flags: approval1.9.1.7?
Comment 8•15 years ago
|
||
Yeah, no reason not to block on this.
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
Target Milestone: --- → mozilla1.9.2
Comment 9•15 years ago
|
||
Turns out this was fixed on trunk before branching for 1.9.2, still need it on 1.9.1 though.
status1.9.2:
--- → beta1-fixed
Comment 10•15 years ago
|
||
Cycle collector exists on the 1.9.0 branch, do we need this there too?
blocking1.9.1: ? → .7+
status1.9.1:
--- → wanted
Updated•15 years ago
|
Flags: wanted1.9.0.x?
Flags: blocking1.9.0.17?
Comment 11•15 years ago
|
||
Comment on attachment 387035 [details] [diff] [review]
Proposed fix
Approved for 1.9.1.7, a=dveditz for release-drivers
Attachment #387035 -
Flags: approval1.9.1.7? → approval1.9.1.7+
Assignee | ||
Comment 12•15 years ago
|
||
Comment on attachment 387035 [details] [diff] [review]
Proposed fix
Yeah, we should just take this on 1.9.0.
Attachment #387035 -
Flags: approval1.9.0.17?
Comment 13•15 years ago
|
||
Comment 14•15 years ago
|
||
Updated•15 years ago
|
Flags: wanted1.9.0.x?
Flags: wanted1.9.0.x+
Flags: blocking1.9.0.18?
Flags: blocking1.9.0.18+
Comment 15•15 years ago
|
||
Comment on attachment 387035 [details] [diff] [review]
Proposed fix
Approved for 1.9.0.18, a=dveditz for release-drivers
Attachment #387035 -
Flags: approval1.9.0.18? → approval1.9.0.18+
Updated•15 years ago
|
Whiteboard: [needs 1.9.0 landing]
Comment 16•15 years ago
|
||
Checked in for 1.9.0.x.
Keywords: fixed1.9.0.18
Whiteboard: [needs 1.9.0 landing]
Comment 17•15 years ago
|
||
Given by Blake's comment 1 we do not have a test and do not know how to test it. So QA can only verify this fix based on the check-ins on all branches. I have checked mozilla1.9.2, mozilla1.9.1, and mozilla1.9.0 for existence of this null pointer check. All look fine. Means I will mark all branches as verified fixed.
Status: RESOLVED → VERIFIED
OS: Linux → All
Hardware: x86 → All
You need to log in
before you can comment on or make changes to this bug.
Description
•