Link mailnews code after xpcom
Categories
(MailNews Core :: Build Config, defect)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: jcranmer, Assigned: jcranmer)
Details
Attachments
(1 file)
This requires some explanation:
I've hit an issue with trying to run leak testing on my local builds of comm-central. When XPCOM_MEM_BLOAT_LOG is enabled, comm-central code crashes in IMAP because of the static initializer of a global nsTArray variable. This is because the nsTArray static initializer tries to call into nsTraceRefcnt, which asserts because it hasn't been created yet.
The IMAP static initializers run before XPCOM static initializers because they are run in link object order, and moz.build arranges the link object order based on the order it gets the objects file during directory traversal. XPCOM is usually the first directory entered, but the app.mozbuild lists comm/mailnews/mailnews.mozbuild before toolkit/toolkit.mozbuild.
One downside of this change is that, during a world rebuild, comm-central code is built after mozilla-central code. But I believe that isn't a big deal, certainly not enough to expose our code to these kinds of hidden gotchas.
Comment 1•4 years ago
|
||
I see no problem with this, as long as /comm/{mail,suite} is at the very end after toolkit. There's a note about that in /browser/app.mozbuild that we should probably copy over. (And fix that incorrect comment about where paths are relative to maybe?) :)
Comment 2•4 years ago
|
||
This will affect the link order XPCOM static initializers to run before
the IMAP ones. This fixes a crash in the IMAP code when XPCOM_MEM_BLOAT_LOG
is enabled during leak testing.
Comment 3•4 years ago
|
||
I ran a local build with this applied without any issues and did some quick testing. I didn't notice any major difference in the actual build order, it may be more of an issue when building with less concurrency than my -j 20.
Try job running at:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=e4203bc32c1513c7d96ff921fc4de310728e9525
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/9552c8a42682
Build toolkit before comm/mailnews. r=jcranmer
Updated•4 years ago
|
Description
•