Closed
Bug 1302975
Opened 8 years ago
Closed 8 years ago
[Static Analysis][Uninitialized pointer field] In constructor Paint
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
firefox51 | --- | affected |
People
(Reporter: andi, Assigned: andi)
References
(Blocks 2 open bugs)
Details
(Keywords: coverity, Whiteboard: CID 1368332)
Attachments
(1 file)
The Static Analysis tool Coverity detected that |mFrame| os not initialised in the default constructor. This should be fixed in order to integrate our un-initilisation checker based on clang-analysis
Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
Why isn't MOZ_INIT_OUTSIDE_CTOR enough here?
// Initialized (if needed) in SetPaintServer():
MOZ_INIT_OUTSIDE_CTOR nsIFrame* mFrame;
If we really need to rewrite this we need to remove that too.
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Robert Longson from comment #2)
> Why isn't MOZ_INIT_OUTSIDE_CTOR enough here?
>
> // Initialized (if needed) in SetPaintServer():
> MOZ_INIT_OUTSIDE_CTOR nsIFrame* mFrame;
>
> If we really need to rewrite this we need to remove that too.
Ive noticed that was initialised in SetPaintServer like mPaintType, so i initialised it for consistency with mPaintType
Comment 4•8 years ago
|
||
It's not accessed if mPaintType is none.
Updated•8 years ago
|
Attachment #8791535 -
Flags: review?(longsonr) → review-
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
Comment on attachment 8791535 [details]
Bug 1302975 - initialise mFrame in Paint constructor.
Just do a hg pull -u and you'll find the code already looks like this.
Attachment #8791535 -
Flags: review?(longsonr) → review-
Assignee | ||
Comment 7•8 years ago
|
||
yes just did this and the fix is there.
Assignee | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•