Initialize all GLXLibrary symbols in the ctor to silence static analysis warnings

RESOLVED FIXED in Firefox 46

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: nical, Assigned: nical)

Tracking

(Blocks: 1 bug, {coverity})

unspecified
mozilla46
coverity
Points:
---

Firefox Tracking Flags

(firefox46 fixed)

Details

(Whiteboard: [CID 749989][CID 1123714])

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

3 years ago
These members are later properly set in EnsureInitialized which is called before any method that reads them, but there's no reason to leave them uninitialized in the constructor considering the annoying warning noise that it generates, and if a bug is introduced it'll be much easier to debug if we dereference nullptr than some random address.
(Assignee)

Updated

3 years ago
Assignee: nobody → nical.bugzilla
Keywords: coverity
Whiteboard: [CID 749989]
(Assignee)

Comment 1

3 years ago
Created attachment 8709414 [details] [diff] [review]
Don't leave uninitialized after in GLXLibrary's ctor
Attachment #8709414 - Flags: review?(matt.woodrow)
(Assignee)

Comment 2

3 years ago
Created attachment 8709421 [details] [diff] [review]
Don't leave uninitialized members after GLXLibrary's ctor

Previously uploaded the wrong version of the patch.
Attachment #8709414 - Attachment is obsolete: true
Attachment #8709414 - Flags: review?(matt.woodrow)
Attachment #8709421 - Flags: review?(matt.woodrow)
(Assignee)

Comment 3

3 years ago
Created attachment 8709458 [details] [diff] [review]
While we are at it, do it for EGL symbols.
Attachment #8709458 - Flags: review?(matt.woodrow)
(Assignee)

Updated

3 years ago
Whiteboard: [CID 749989] → [CID 749989][CID 1123714]
Attachment #8709421 - Flags: review?(matt.woodrow) → review+
Attachment #8709458 - Flags: review?(matt.woodrow) → review+

Comment 5

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c940c4d4b17e
https://hg.mozilla.org/mozilla-central/rev/75104f84eda6
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Blocks: 1230156
You need to log in before you can comment on or make changes to this bug.