Closed Bug 1302975 Opened 8 years ago Closed 8 years ago

[Static Analysis][Uninitialized pointer field] In constructor Paint

Categories

(Core :: SVG, defect)

defect
Not set
normal

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
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.
(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
It's not accessed if mPaintType is none.
Attachment #8791535 - Flags: review?(longsonr) → review-
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-
yes just did this and the fix is there.
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.

Attachment

General

Creator:
Created:
Updated:
Size: