[Static Analysis][Uninitialized scalar field] In constructor nsDisplayItem(nsIFrame* aFrame)

RESOLVED FIXED in Firefox 49

Status

()

Core
Layout
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: andi, Assigned: andi)

Tracking

(Blocks: 1 bug, {coverity})

Trunk
mozilla50
coverity
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox49 fixed, firefox50 fixed)

Details

(Whiteboard: CID 1364099)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

a year ago
The Static Analysis tool Coverity detected that |mForceNotVisible| is not initialised in the following context:

>>  explicit nsDisplayItem(nsIFrame* aFrame)
>>    : mFrame(aFrame)
>>    , mClip(nullptr)
>>    , mScrollClip(nullptr)
>>    , mReferenceFrame(nullptr)
>>    , mAnimatedGeometryRoot(nullptr)
>>#ifdef MOZ_DUMP_PAINTING
>>    , mPainted(false)
>>#endif
>>  {
>>  }

In order to integrate our static analysis tool that checks for uninitialised member variables we need this to be initialised for marked as skipped, like 1282408, but judging from the context i think we can initialise it with false.
(Assignee)

Comment 1

a year ago
Created attachment 8774721 [details]
Bug 1289407 - initialise |mForceNotVisible| in explicit ctor.

Review commit: https://reviewboard.mozilla.org/r/67162/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/67162/
Attachment #8774721 - Flags: review?(bzbarsky)
Attachment #8774721 - Flags: review?(bzbarsky) → review?(tnikkel)
Blocks: 1276467
Comment on attachment 8774721 [details]
Bug 1289407 - initialise |mForceNotVisible| in explicit ctor.

https://reviewboard.mozilla.org/r/67162/#review64094

Thanks. We'll want to uplift to aurora and beta because the patch that caused this has been uplifted.
Attachment #8774721 - Flags: review?(tnikkel) → review+
Comment on attachment 8774721 [details]
Bug 1289407 - initialise |mForceNotVisible| in explicit ctor.

Actually, probably too late for beta.

Approval Request Comment
[Feature/regressing bug #]: bug 1276467
[User impact if declined]: fix for bug 1276467 (which we uplifted) might not get applied in the right cases
[Describe test coverage new/current, TreeHerder]: nope
[Risks and why]: safe
[String/UUID change made/needed]: none
Attachment #8774721 - Flags: approval-mozilla-aurora?

Comment 4

a year ago
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1d4ebd027c42
initialise |mForceNotVisible| in explicit ctor. r=tnikkel

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/1d4ebd027c42
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox50: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
status-firefox49: --- → affected
Comment on attachment 8774721 [details]
Bug 1289407 - initialise |mForceNotVisible| in explicit ctor.

sure, let's take it
Attachment #8774721 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/11204e05dff9
status-firefox49: affected → fixed
You need to log in before you can comment on or make changes to this bug.