Closed
Bug 1361656
Opened 7 years ago
Closed 7 years ago
Coverity report: nsGridContainerFrame::nsGridContainerFrame(nsStyleContext *): A scalar field is not initialized by the constructor
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox53 | --- | wontfix |
firefox54 | --- | wontfix |
firefox55 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: emilio)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity, good-first-bug, regression, Whiteboard: [lang=C++][CID 1291009])
Coverity CID 1291009 Uninitialized scalar field The field will contain an arbitrary value left over from earlier computations. In nsGridContainerFrame::nsGridContainerFrame(nsStyleContext *): A scalar field is not initialized by the constructor 260 explicit nsGridContainerFrame(nsStyleContext* aContext) 261 : nsContainerFrame(aContext, mozilla::LayoutFrameType::GridContainer) 262 , mCachedMinISize(NS_INTRINSIC_WIDTH_UNKNOWN) 263 , mCachedPrefISize(NS_INTRINSIC_WIDTH_UNKNOWN) 264 { 265 mBaseline[0][0] = NS_INTRINSIC_WIDTH_UNKNOWN; 266 mBaseline[0][1] = NS_INTRINSIC_WIDTH_UNKNOWN; 267 mBaseline[1][0] = NS_INTRINSIC_WIDTH_UNKNOWN; 268 mBaseline[1][1] = NS_INTRINSIC_WIDTH_UNKNOWN; CID 1291009 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)2. uninit_member: Non-static class member mDidPushItemsBitMayLie is not initialized in this constructor nor in any functions that it calls. 269 } mDidPushItemsBitMayLie is #ifdef DEBUG and nothing bad happens if it has the wrong value - just a false positive assert in the worst case. Still, we should init it to zero in the ctor to avoid that.
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/eb9858f09ee5 Initialize nsGridContainerFrame::mDidPushItemsBitMayLie. r=mats
Comment 2•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eb9858f09ee5
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
Assignee: nobody → emilio+bugs
status-firefox53:
--- → wontfix
status-firefox54:
--- → affected
status-firefox-esr52:
--- → unaffected
Updated•7 years ago
|
Blocks: coverity-analysis
Updated•7 years ago
|
Whiteboard: [lang=C++] → [lang=C++][CID 1291009]
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•