Closed
Bug 1361591
Opened 7 years ago
Closed 7 years ago
Coverity report: nsMathMLmspaceFrame::nsMathMLmspaceFrame(nsStyleContext *): A scalar field is not initialized by the constructor
Categories
(Core :: MathML, defect, P4)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox53 | --- | wontfix |
firefox54 | --- | wontfix |
firefox55 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: fredw)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity, good-first-bug, regression, Whiteboard: [CID 750316])
Attachments
(1 file)
1.09 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
Coverity CID 750316 Uninitialized scalar field The field will contain an arbitrary value left over from earlier computations. In nsMathMLmspaceFrame::nsMathMLmspaceFrame(nsStyleContext *): A scalar field is not initialized by the constructor 38protected: 2. uninit_member: Non-static class member mWidth is not initialized in this constructor nor in any functions that it calls. 4. uninit_member: Non-static class member mHeight is not initialized in this constructor nor in any functions that it calls. CID 750316 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)6. uninit_member: Non-static class member mDepth is not initialized in this constructor nor in any functions that it calls. 39 explicit nsMathMLmspaceFrame(nsStyleContext* aContext) : nsMathMLContainerFrame(aContext) {} 40 virtual ~nsMathMLmspaceFrame(); 41 42 virtual nsresult 43 MeasureForWidth(DrawTarget* aDrawTarget, 44 ReflowOutput& aDesiredSize) override; 45 46private: 1. member_decl: Class member declaration for mWidth. 47 nscoord mWidth; 3. member_decl: Class member declaration for mHeight. 48 nscoord mHeight; 5. member_decl: Class member declaration for mDepth. 49 nscoord mDepth;
Reporter | ||
Comment 1•7 years ago
|
||
We should init those three member fields to zero in the ctor: http://searchfox.org/mozilla-central/rev/abe68d5dad139e376d5521ca1d4b7892e1e7f1ba/layout/mathml/nsMathMLmspaceFrame.h#39
Updated•7 years ago
|
Blocks: coverity-analysis
Whiteboard: [CID 750316]
Assignee | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment on attachment 8865111 [details] [diff] [review] Patch >Bug 1361591 - Coverity report: nsMathMLmspaceFrame::ânsMathMLmspaceFrame(nsStyleContext *): A scalar field is not initialized by the constructor. r=karlt Please describe in the commit message what the patch changes (In reply to Mats Palmgren (:mats) from comment #1) > We should init those three member fields to zero in the ctor: > http://searchfox.org/mozilla-central/rev/ > abe68d5dad139e376d5521ca1d4b7892e1e7f1ba/layout/mathml/nsMathMLmspaceFrame. > h#39 and why they should be set to zero in the constructor.
Attachment #8865111 -
Flags: review?(karlt) → review?(mats)
Reporter | ||
Updated•7 years ago
|
Attachment #8865111 -
Flags: review?(mats) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/76845c4d9d5c Coverity report: nsMathMLmspaceFrame:nsMathMLmspaceFrame(nsStyleContext *): A scalar field is not initialized by the constructor. r=karlt
Keywords: checkin-needed
Comment 5•7 years ago
|
||
Drive-by comment, this landed with the wrong commit message (comment 3) and reviewer.
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/76845c4d9d5c
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
status-firefox53:
--- → wontfix
status-firefox54:
--- → wontfix
status-firefox-esr52:
--- → unaffected
You need to log in
before you can comment on or make changes to this bug.
Description
•