Closed
Bug 1006307
Opened 10 years ago
Closed 10 years ago
widget/xpwidgets/GfxInfoBase.cpp:450:43: error: 'version' may be used uninitialized in function BlacklistEntryToDriverInfo() [-Wuninitialized]
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: cpeterson, Assigned: cpeterson)
References
(Blocks 1 open bug)
Details
(Keywords: regression, Whiteboard: [qa-])
Attachments
(1 file)
2.72 KB,
patch
|
bjacob
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
ParseDriverVersion() returns true/success without setting out-parameter aNumericVersion #if !defined(XP_WIN) && !defined(ANDROID). This is a regression from bug 689598. widget/xpwidgets/GfxInfoBase.cpp: In member function 'virtual nsresult mozilla::widget::GfxInfoBase::Observe(nsISupports*, const char*, const char16_t*)': widget/xpwidgets/GfxInfoBase.cpp:450:43: error: 'version' may be used uninitialized in this function [-Werror=uninitialized] widget/xpwidgets/GfxInfoBase.cpp:448:14: note: 'version' was declared here
Assignee | ||
Comment 1•10 years ago
|
||
Fix -Wuninitialized and -Wunused-variable warnings in widget/xpwidgets/GfxInfoBase.cpp. Should ParseDriverVersion() return true/success or false on platforms other than Windows and Android? btw, of the eight calls to ParseDriverVersion() in the tree, only two actually check the return value.
Comment 2•10 years ago
|
||
Comment on attachment 8418568 [details] [diff] [review] ParseDriverVersion_Wuninitialized.patch Review of attachment 8418568 [details] [diff] [review]: ----------------------------------------------------------------- It's good to return false when not supporting driver version parsing. This seems to be only used in BlacklistEntryToDriverInfo(), which seems to expect that. ::: widget/xpwidgets/GfxInfoBase.cpp @@ +599,3 @@ > uint64_t driverVersion; > ParseDriverVersion(adapterDriverVersionString, &driverVersion); > +#endif Actually driverVersion seems to be unused in this function. So you can just remove this two lines, like the other two lines below in this file.
Attachment #8418568 -
Flags: review?(bjacob) → review+
Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Benoit Jacob [:bjacob] from comment #2) > ::: widget/xpwidgets/GfxInfoBase.cpp > @@ +599,3 @@ > > uint64_t driverVersion; > > ParseDriverVersion(adapterDriverVersionString, &driverVersion); > > +#endif > > Actually driverVersion seems to be unused in this function. So you can just > remove this two lines, like the other two lines below in this file. driverVersion is unused in GfxInfoBase::GetFeatureStatusImpl(), but it is used in GfxInfoBase::FindBlocklistedDeviceInList #if defined(XP_WIN) || defined(ANDROID): https://hg.mozilla.org/mozilla-central/file/fef1a56f0237/widget/xpwidgets/GfxInfoBase.cpp#l650
Assignee | ||
Comment 4•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1f5a03f07f9a
status-firefox31:
--- → affected
status-firefox32:
--- → fixed
Comment 5•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1f5a03f07f9a
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8418568 [details] [diff] [review] ParseDriverVersion_Wuninitialized.patch [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: No known issues, but this patch fixes possible uninitialized data when Firefox tries to read the graphics driver version, which could cause graphics driver blacklist confusion. Testing completed (on m-c, etc.): m-c for four days Risk to taking this patch (and alternatives if risky): Low risk. String or IDL/UUID changes made by this patch: No string changes.
Attachment #8418568 -
Flags: approval-mozilla-aurora?
Updated•10 years ago
|
Attachment #8418568 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 8•10 years ago
|
||
Chris, is this something you can include in a testsuite or is there some way QA can help out? Thanks!
Flags: needinfo?(cpeterson)
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Liz Henry :lizzard from comment #8) > Chris, is this something you can include in a testsuite or is there some way > QA can help out? Thanks! No. We don't have any relevant tests for this particular fix.
Flags: needinfo?(cpeterson)
You need to log in
before you can comment on or make changes to this bug.
Description
•