Coverity report: nsMathMLmencloseFrame::mRuleThickness/mRadicalRuleThickness is not initialized in this constructor nor in any functions that it calls

RESOLVED FIXED in Firefox 55

Status

()

Core
MathML
P4
minor
RESOLVED FIXED
7 months ago
7 months ago

People

(Reporter: mats, Assigned: fredw)

Tracking

(Blocks: 1 bug, {coverity, good-first-bug, regression})

53 Branch
mozilla55
coverity, good-first-bug, regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox53 wontfix, firefox54 wontfix, firefox55 fixed)

Details

(Whiteboard: [CID 750310], URL)

Attachments

(1 attachment)

(Reporter)

Description

7 months ago
Coverity CID 750310 Uninitialized scalar field

The field will contain an arbitrary value left over from earlier computations.

In nsMathMLmencloseFrame::​nsMathMLmencloseFrame(nsStyleContext *): A scalar field is not initialized by the constructor


 50nsMathMLmencloseFrame::nsMathMLmencloseFrame(nsStyleContext* aContext) :
 51  nsMathMLContainerFrame(aContext), mNotationsToDraw(0),
 52  mLongDivCharIndex(-1), mRadicalCharIndex(-1), mContentWidth(0)
 53{
   2. uninit_member: Non-static class member mRuleThickness is not initialized in this constructor nor in any functions that it calls.
   CID 750310 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)4. uninit_member: Non-static class member mRadicalRuleThickness is not initialized in this constructor nor in any functions that it calls.
 54}
(Reporter)

Comment 1

7 months ago
It looks like we initialize these during reflow and then use them during paint
so it's probably OK.  I think we should initialize them to zero in the ctor anyway.
Keywords: good-first-bug
Blocks: 1230156
Whiteboard: [CID 750310]
(Assignee)

Comment 2

7 months ago
Created attachment 8865114 [details] [diff] [review]
Patch
Assignee: nobody → fred.wang
Status: NEW → ASSIGNED
Attachment #8865114 - Flags: review?(karlt)
Comment on attachment 8865114 [details] [diff] [review]
Patch

See https://bugzilla.mozilla.org/show_bug.cgi?id=1361647#c2
and https://bugzilla.mozilla.org/show_bug.cgi?id=1361591#c3
Attachment #8865114 - Flags: review?(karlt) → review?(mats)
(Reporter)

Updated

7 months ago
Attachment #8865114 - Flags: review?(mats) → review+
(Assignee)

Updated

7 months ago
Keywords: checkin-needed

Comment 4

7 months ago
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc5f257ad83b
Coverity report: nsMathMLmencloseFrame::mRuleThickness/mRadicalRuleThickness is not initialized in this constructor nor in any functions that it calls. r=karlt
Keywords: checkin-needed

Comment 5

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/fc5f257ad83b
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
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.