Closed
Bug 62006
Opened 24 years ago
Closed 16 years ago
assertions about static ctors
Categories
(Core :: XPCOM, defect, P4)
Tracking
()
RESOLVED
WORKSFORME
Future
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
Attachments
(1 file)
6.55 KB,
patch
|
Details | Diff | Splinter Review |
It wouldn't be hard to cause assertions for *most* cases where people use
statically constructed XPCOM objects. It could be done by:
* adding (if they aren't there already) methods to nsTraceRefcnt to access the
number of bytes allocated and the number freed
* checking that these numbers don't change around:
* calls to PR_LoadLibrary and PR_UnloadLibrary in nsDll
* all atexit functions (since that's how statics in function scope are
implemented on Linux, at least), by writing 2 functions, one called atexit() in
NS_InitXPCOM2, and the other in NS_ShutdownXPCOM, that compare the numbers
between when these 2 are called.
Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla1.0.1
Assignee | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 3•24 years ago
|
||
Well, I now have enough of these removed in my tree to see that there are
threadsafety problems with this patch (wow, what a surprise). Perhaps the way
to fix the problem is to store the thread on which we're loading a library and
only assert if the allocation is on that thread too...
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.0.1 → Future
Assignee | ||
Updated•23 years ago
|
Priority: P3 → P4
Updated•19 years ago
|
QA Contact: kandrot → nobody
Updated•19 years ago
|
QA Contact: nobody → xpcom
Comment 4•16 years ago
|
||
I think this is working now, threadsafely even.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•