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)

53 Branch
defect
Not set
normal

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.
This one is not exactly a regression, but feels nicer.
Attachment #8864211 - Flags: review?(mats)
Attachment #8864208 - Flags: review?(mats)
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...
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.
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 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 on attachment 8864207 [details] [diff] [review] 0003-Initialize-nsGridContainerFrame-mDidPushItemsBitMayL.patch FYI, this one is bug 1361656.
Attachment #8864207 - Flags: review?(mats) → review+
Comment on attachment 8864208 [details] [diff] [review] 0004-Initialize-nsPlaceholderFrame-mOutOfFlowFrame.patch FYI, this one is bug 1361612.
Attachment #8864208 - Flags: review?(mats) → review+
Attachment #8864211 - Flags: review?(mats) → review+
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 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+
Attachment #8864215 - Flags: review?(mats) → review+
Attachment #8864216 - Flags: review?(mats) → review+
Attachment #8864217 - Flags: review?(mats) → review+
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 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+
Attachment #8864222 - Flags: review?(mats) → review+
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
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! :)
Group: core-security-release
Group: core-security
Whiteboard: [adv-main55+]
Flags: qe-verify-
Whiteboard: [adv-main55+] → [adv-main55+][post-critsmash-triage]
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: