Uninitialized members in mozilla::layers::TextRenderer constructor

RESOLVED FIXED in Firefox 41

Status

()

Core
Graphics: Layers
--
trivial
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: nical, Assigned: Baptiste Emmanuel, Mentored)

Tracking

({coverity})

unspecified
mozilla41
coverity
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
mMap is not initialized in the constructor. In practice the code is correct because we never call read from mMap without calling EnsureIntialized, but it contributres to the coverity warning noise and half initialized structures are generally a bad idea, so let's fix it.
(Reporter)

Updated

3 years ago
Keywords: coverity
(Assignee)

Comment 1

3 years ago
Hi,

I would like to work on this bug. First contribution
(Reporter)

Updated

3 years ago
Assignee: nobody → baptiste.em
(Assignee)

Comment 2

3 years ago
Quick question. Do I have to take the code inside EnsureIntialized and put it in the constructor or just initialized mMap to something else.
(Reporter)

Comment 3

3 years ago
(In reply to Baptiste Emmanuel from comment #2)
> Quick question. Do I have to take the code inside EnsureIntialized and put
> it in the constructor or just initialized mMap to something else.

Initializing it with mData = nullptr and mStride = 0 is enough.
(Assignee)

Comment 4

3 years ago
Created attachment 8607573 [details] [diff] [review]
textrender.constructor.v1.patch
Attachment #8607573 - Flags: review?(nical.bugzilla)
(Reporter)

Updated

3 years ago
Attachment #8607573 - Flags: review?(nical.bugzilla) → review+

Updated

3 years ago
Keywords: checkin-needed
can we get a try run for this, thanks!
Flags: needinfo?(baptiste.em)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/26b9e4567122
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
(Assignee)

Updated

3 years ago
Flags: needinfo?(baptiste.em)
You need to log in before you can comment on or make changes to this bug.