Embedding leaks make it harder to assert shutdown correctness
Categories
(Core :: JavaScript: GC, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file, 1 obsolete file)
Updated•8 years ago
|
Assignee | ||
Comment 1•8 years ago
|
||
Comment 3•8 years ago
|
||
Updated•8 years ago
|
Assignee | ||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Comment 6•8 years ago
|
||
Assignee | ||
Comment 7•8 years ago
|
||
Assignee | ||
Comment 8•8 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Picking this up again as this continues to be a problem.
Using MOZ_LOG_CTOR makes things much easier, thanks.
What we want to happen is that GC things that are live at shutdown are reported but are finalized anyway. It might be nice to also clear embedding pointers to GC things at shutdown because otherwise these are left dangling pointing to freed memory.
My current issue is that finalizing preserved wrappers causes an assertion in the wrapper cache destructor.
Assignee | ||
Comment 11•6 years ago
|
||
Patch to report JS GC things that are live at shutdown as leaks by calling MOZ_LOG_CTOR for them. The JS engine now asserts there are no roots, and the CC clears any remaining JS holders (which will already have been reported). I used Unlink() for this because otherwise the wrapper cache asserts if we try and clear the contents of a preserved wrapper from a leaked GC thing's finalizer.
The only fly in the ointment is the test_ext_native_messaging.js xpcshell test, because this patch causes it to fail with an assertion here:
https://searchfox.org/mozilla-central/source/dom/events/EventListenerManager.cpp#138
I'm assuming this is connected to the fact that it leaks (bug 1570666).
Updated•6 years ago
|
Updated•6 years ago
|
Comment 12•6 years ago
|
||
Assignee | ||
Comment 13•6 years ago
|
||
Lando seems to have messed up the commit messaged. Filed bug 1573398.
Assignee | ||
Updated•6 years ago
|
Comment 14•6 years ago
|
||
\o/
(In reply to Jon Coppeard (:jonco) from comment #13)
Lando seems to have messed up the commit messaged. Filed bug 1573398.
I think the trailing ?
in r=foo?
confuses it. I've noticed it also doesn't remove it when there's a single reviewer.
Comment 15•6 years ago
|
||
bugherder |
Description
•