Closed
Bug 1920717
Opened 10 months ago
Closed 9 months ago
Build a linter that checks for global variable with runtime initialization
Categories
(Firefox Build System :: General, task)
Firefox Build System
General
Tracking
(firefox134 fixed)
RESOLVED
FIXED
134 Branch
Tracking | Status | |
---|---|---|
firefox134 | --- | fixed |
People
(Reporter: sergesanspaille, Assigned: sergesanspaille)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
This linter would be quite close to -Wglobal-constructors
but it would be aware of MOZ_GLOBAL_CLASS
, and of a new attribute MOZ_RUNINIT
that explicitly flags global variable that requires runtime initialization.
The goal is to avoid adding such globals (i.e. no regression) and make existing state explicit.
Assignee | ||
Comment 1•10 months ago
|
||
This patch both:
-
Provides a static checker to detect global variables which may not be
initialized at compile-time -
Verify that variables flagged as MOZ_RUNINIT are indeed
initialized at runtime, unless they are also flagged as MOZ_GENERATED
(to avoid false positive)
Updated•10 months ago
|
Attachment #9426821 -
Attachment description: Bug 1920717 - Add static checker for global variables with runtime initialisation r=glandium → Bug 1920717 - Add static checker for global variables with runtime initialisation r=glandium!
Updated•10 months ago
|
Attachment #9426821 -
Attachment description: Bug 1920717 - Add static checker for global variables with runtime initialisation r=glandium! → Bug 1920717 - Add static checker for global variables with runtime initialisation r=glandium
Updated•9 months ago
|
Attachment #9426821 -
Attachment description: Bug 1920717 - Add static checker for global variables with runtime initialisation r=glandium → Bug 1920717 - Add static checker for global variables with runtime initialisation r=glandium!
Pushed by sguelton@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39dc4be7fd58
Add static checker for global variables with runtime initialisation r=glandium
Status: NEW → RESOLVED
Closed: 9 months ago
status-firefox134:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•