Closed
Bug 1361749
Opened 9 years ago
Closed 9 years ago
Initialize a bunch of variables that are left uninitialized on construction after bug 1316556
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox-esr52 | --- | unaffected |
| firefox53 | --- | wontfix |
| firefox54 | --- | wontfix |
| firefox55 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(4 keywords, Whiteboard: [adv-main55+][post-critsmash-triage])
Attachments
(13 files)
|
1.10 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
2.68 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
1.17 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
954 bytes,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
1.84 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
1.65 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
1.23 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
987 bytes,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
1009 bytes,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
983 bytes,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
924 bytes,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
846 bytes,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
|
1.26 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
I ran the analysis in bug 525063 (with a custom patch posted there, and another one to skip stuff out of layout, and other offenders like nsDisplayList.h and nsStyleStruct.h, which do this on purpose).
It caught a few things. Some were already caught by coverity, others weren't I think.
In any case, I've been patching as I read diagnostics, so I'm going to start posting patches soon.
Flagging ss just in case.
| Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8864204 -
Flags: review?(mats)
| Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8864205 -
Flags: review?(mats)
| Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8864207 -
Flags: review?(mats)
| Assignee | ||
Comment 4•9 years ago
|
||
| Assignee | ||
Comment 5•9 years ago
|
||
This one is not exactly a regression, but feels nicer.
Attachment #8864211 -
Flags: review?(mats)
| Assignee | ||
Updated•9 years ago
|
Attachment #8864208 -
Flags: review?(mats)
| Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8864213 -
Flags: review?(mats)
| Assignee | ||
Comment 7•9 years ago
|
||
Attachment #8864214 -
Flags: review?(mats)
| Assignee | ||
Comment 8•9 years ago
|
||
Attachment #8864215 -
Flags: review?(mats)
| Assignee | ||
Comment 9•9 years ago
|
||
Attachment #8864216 -
Flags: review?(mats)
| Assignee | ||
Comment 10•9 years ago
|
||
Attachment #8864217 -
Flags: review?(mats)
| Assignee | ||
Comment 11•9 years ago
|
||
Attachment #8864218 -
Flags: review?(mats)
| Assignee | ||
Comment 12•9 years ago
|
||
Attachment #8864219 -
Flags: review?(mats)
| Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8864222 -
Flags: review?(mats)
| Assignee | ||
Comment 14•9 years ago
|
||
I think those are all. Others are more tricky, like the nsDisplayList.h ones, which use an empty constructor so protected classes can initialize their fields (they should use delegating constructors instead I think). But those aren't nothing new nor affected by bug 1316556, so...
Comment 15•9 years ago
|
||
FYI, I filed individual bugs for most of these I think, see recent bugs filed by me tagged 'coverity'.
I'll try to indicate which one matches each patch so you can resolve those as fixed, and/or perhaps
change the commit message to indicate that bug instead? I think most of these are not security
sensitive, except perhaps the nsSVGPatternFrame::mSource one, but I suspect it's sec-low at worst.
Updated•9 years ago
|
status-firefox53:
--- → wontfix
status-firefox54:
--- → affected
status-firefox55:
--- → affected
status-firefox-esr52:
--- → unaffected
Comment 16•9 years ago
|
||
Comment on attachment 8864204 [details] [diff] [review]
0001-Bug-1361749-Remove-unused-empty-constructor-of-Scrol.patch
Review of attachment 8864204 [details] [diff] [review]:
-----------------------------------------------------------------
r=mats, nit:
I can't really tell what the commit message will end up being from that
mail header but if the "1 file changed, 1 deletion" stuff is included,
could you get rid of that bit if possible? I don't think we usually
include commit stats like that and it seems mostly spam to me.
(same nit applies to all patches I assume)
Attachment #8864204 -
Flags: review?(mats) → review+
Comment 17•9 years ago
|
||
Comment on attachment 8864205 [details] [diff] [review]
0002-Bug-1361749-Initialize-all-the-fields-in-nsFrameCont.patch
I'm not a fan of individual member inits, but fine if it's allowed by the coding style guide I guess.
Attachment #8864205 -
Flags: review?(mats) → review+
Comment 18•9 years ago
|
||
Comment on attachment 8864207 [details] [diff] [review]
0003-Initialize-nsGridContainerFrame-mDidPushItemsBitMayL.patch
FYI, this one is bug 1361656.
Attachment #8864207 -
Flags: review?(mats) → review+
Comment 19•9 years ago
|
||
Comment on attachment 8864208 [details] [diff] [review]
0004-Initialize-nsPlaceholderFrame-mOutOfFlowFrame.patch
FYI, this one is bug 1361612.
Attachment #8864208 -
Flags: review?(mats) → review+
Updated•9 years ago
|
Attachment #8864211 -
Flags: review?(mats) → review+
Comment 20•9 years ago
|
||
Comment on attachment 8864213 [details] [diff] [review]
0006-Initialize-nsSVGPatternFrame-mSource.patch
FYI, this one is bug 1361596.
Attachment #8864213 -
Flags: review?(mats) → review+
Comment 21•9 years ago
|
||
Comment on attachment 8864214 [details] [diff] [review]
0007-Initialize-nsBoxFrame-mFlex-mAscent-.-r-mats.patch
FYI, this one is bug 1361517.
Attachment #8864214 -
Flags: review?(mats) → review+
Updated•9 years ago
|
Attachment #8864215 -
Flags: review?(mats) → review+
Updated•9 years ago
|
Attachment #8864216 -
Flags: review?(mats) → review+
Updated•9 years ago
|
Attachment #8864217 -
Flags: review?(mats) → review+
Comment 22•9 years ago
|
||
Comment on attachment 8864218 [details] [diff] [review]
0011-Initialize-nsInlineFrame-mBaseline.patch
FYI, this one is bug 1361513. Could initialize it to NS_INTRINSIC_WIDTH_UNKNOWN instead as I suggested in that bug? That way we will likely catch any misuse of GetLogicalBaseline() before mBaseline have been properly calculated (during Reflow).
Attachment #8864218 -
Flags: review?(mats) → review+
Comment 23•9 years ago
|
||
Comment on attachment 8864219 [details] [diff] [review]
0012-Initialize-BRFrame-mAscent.patch
FYI, this one is bug 1361659. Ditto about using NS_INTRINSIC_WIDTH_UNKNOWN instead.
Attachment #8864219 -
Flags: review?(mats) → review+
Updated•9 years ago
|
Attachment #8864222 -
Flags: review?(mats) → review+
Comment 24•9 years ago
|
||
See bug 1361509 comment 1 and bug 1361612 comment 1 for the analysis of those two
issues. The rest seems unlikely to cause security issues.
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → 53 Branch
| Assignee | ||
Comment 25•9 years ago
|
||
For the record, the stats of the commit are an artifact of how git exports commits, but don't end up in the final commit. Will land patches with bugs filled with the relevant bug number, and use NS_INTRINSIC_WIDTH_UNKNOWN as suggested.
Thanks for the reviews mats! :)
Comment 26•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ab36c381d34f
https://hg.mozilla.org/mozilla-central/rev/35c7efc47b1f
https://hg.mozilla.org/mozilla-central/rev/d7a57f76f0ef
https://hg.mozilla.org/mozilla-central/rev/1a826ca2c7c0
https://hg.mozilla.org/mozilla-central/rev/d7f069fa65d7
https://hg.mozilla.org/mozilla-central/rev/14990dfd94dd
https://hg.mozilla.org/mozilla-central/rev/6aa9b5172e88
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•9 years ago
|
Group: core-security-release
Updated•9 years ago
|
Updated•9 years ago
|
Group: core-security
Updated•9 years ago
|
Whiteboard: [adv-main55+]
Updated•9 years ago
|
Flags: qe-verify-
Whiteboard: [adv-main55+] → [adv-main55+][post-critsmash-triage]
Updated•8 years ago
|
Group: core-security-release
Updated•8 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•