Closed
Bug 36804
Opened 25 years ago
Closed 25 years ago
[MLK] Leaking nsFactoryEntry objects
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
VERIFIED
INVALID
M16
People
(Reporter: beard, Assigned: dp)
Details
nsComponentManagerImpl::PlatformPrePopulateRegistry() leaks nsFactoryEntry
objects if multiple entries for the same CID are found in the registry. I
discovered this while sanity checking the Boehm collector on Linux. Here's a
patch to fix the apparent leak:
Index: nsComponentManager.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/components/nsComponentManager.cpp,v
retrieving revision 1.114
diff -r1.114 nsComponentManager.cpp
818a819,826
>
> /* the following leaks if an entry is already in the table. */
> nsFactoryEntry *oldEntry = (nsFactoryEntry*) mFactories->Get(&key);
> if (oldEntry != NULL) {
> fprintf(stderr, "warning: replacing old factory entry.\n");
> mFactories->RemoveAndDelete(&key);
> }
>
Assignee | ||
Comment 2•25 years ago
|
||
This is wierd. This is in the prepopulation code. The key is the classid. For a
clash to happen, there should be two CIDs in the registry that are implemented
by two different dlls. This aint possible. I tried your patch and I never hit
the warning.
So I would be really interested in the situation that you caused this to happen.
Assignee | ||
Comment 3•25 years ago
|
||
I meant, this would mean that registry list of CID has a CID listed twice.
Cannot happen. Hence I am very interested in knowing the case how you made this
happen.
Assignee | ||
Comment 4•25 years ago
|
||
Marking INVALID. This cannot happen. Maybe I will add an assert.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Comment 5•25 years ago
|
||
- Per last comments, age of bug, and no reopen - Marking Verified/invalid.
Please reopen if still a problem.
Comment 6•25 years ago
|
||
oops...forgot to actually mark it.
doing so now.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•