Closed Bug 1928157 Opened 1 year ago Closed 1 year ago

Port Bug 1920718 - Flag all global constructor with runtime initialization with a specific attribute

Categories

(Thunderbird :: General, task)

task

Tracking

(thunderbird_esr128 unaffected, thunderbird133 unaffected)

RESOLVED FIXED
134 Branch
Tracking Status
thunderbird_esr128 --- unaffected
thunderbird133 --- unaffected

People

(Reporter: benc, Assigned: benc)

References

(Depends on 6 open bugs)

Details

Attachments

(2 files, 1 obsolete file)

nsMailApp.cpp:154:1: error: Global variable has runtime initialisation, try to remove it, make it constexpr or MOZ_CONSTINIT if possible, or as a last resort flag it as MOZ_RUNINIT.

It's gBootstrap, so following m-c and adding MOZ_RUNINIT.

Possible there might be some more to track down.

Pushed by benc@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/8b1a8a4da370
Annotate gBootstrap with runtime initialization attributes. rs=bustage-fix

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

The shutdown handler in comm/mailnews/base/src/FolderCompactor.cpp:582 also needs fixing. I suspect MOZ_RUNINIT is a bad idea and it shouldn't be a RefPtr<>...

And I bet there'll be some more lurking in there.

Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---

If that can help: the ideal is to flag global variable as constexpr. If that doesn't make sense, MOZ_CONSTINIT (a backport of constinit) ensures there's no global constructor associated to that variable. Otherwise MOZ_RUNINIT which basically means there's a runtime initialization associated to that global variable (from a syntactic point of view).

We need to get rid of the bulk of these, but this at least gets us back up and building.

We need to get rid of the bulk of these, but this at least gets us back up and building.

Pushed by benc@thunderbird.net: https://hg.mozilla.org/comm-central/rev/0651eba1ffa1 Stopgap bustage fix. Apply MOZ_RUNINIT to global vars with constructors.
Depends on: 1928210
Depends on: 1928212
Depends on: 1928213
Depends on: 1928214
Pushed by benc@thunderbird.net: https://hg.mozilla.org/comm-central/rev/6ab306398cb1 Stopgap bustage fix, adding MOZ_RUNINIT to gtest data. rs=bustage-fix
Depends on: 1928218
Depends on: 1928220
Depends on: 1928221
Assignee: nobody → geoff
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/bee199eeb648 Stopgap bustage fix, adding MOZ_RUNINIT to Windows and Mac specific files. r=john.bieling
Attachment #9434345 - Attachment is obsolete: true
See Also: → 1936077
Depends on: 1945007
Depends on: 1945008
Depends on: 1945009
Depends on: 1945011
Assignee: geoff → benc
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Keywords: leave-open
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: