Closed
Bug 1278242
Opened 9 years ago
Closed 9 years ago
[Static Analysis][Uninitialized pointer read] In function SurfaceDescriptorX11
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla51
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: [gfx-noted] CID 1362536, CID 1362537, CID 1362538, CID 1362539, CID 1362540, CID 1362541, CID 750461)
Attachments
(1 file, 1 obsolete file)
The Static Analysis tool Coverity detected that |mId| is used without initialization:
>> SurfaceDescriptorX11 tmp = SurfaceDescriptorX11();
>> (*(v__)) = tmp;
>> if ((!(Read((&((v__)->get_SurfaceDescriptorX11())), msg__, iter__)))) {
>> FatalError("Error deserializing Union type");
>> return false;
>> }
Also a good idea to initialize |mId| is to be able to prepare the base code for the integration of 525063
Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/57908/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57908/
Attachment #8760262 -
Flags: review?(jmuizelaar)
Comment 2•9 years ago
|
||
These are public fields that are initialized by the caller. In bug 525063 it might be good to limit the warnings to private fields to start.
I'm still trying to decide whether this is the right fix to the problem.
Comment 3•9 years ago
|
||
Is there an annotation that we can use for fields that are intentionally uninitialized?
Flags: needinfo?(bpostelnicu)
Assignee | ||
Comment 4•9 years ago
|
||
yes you can use: MOZ_INITIALIZED_OUTSIDE_CONSTRUCTOR. Also i've updated the patch with this change. Once the patch for clang-plugin gets landed evey memebr variables that is declared using MOZ_INITIALIZED_OUTSIDE_CONSTRUCTOR will be automatially ignored from analysis.
Flags: needinfo?(bpostelnicu)
Assignee | ||
Comment 5•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/60984/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/60984/
Attachment #8765759 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•9 years ago
|
Attachment #8760262 -
Attachment is obsolete: true
Attachment #8760262 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8765759 [details]
Bug 1278242 - ignore initialization check for members from SurfaceDescriptorX11.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60984/diff/1-2/
Comment 7•9 years ago
|
||
https://reviewboard.mozilla.org/r/60984/#review57860
Can we use Drawable MOZ_INIT_OUTSIDE_CTOR mGLXPixmap; instead of the syntax you proposed? That or another variant that has MOZ_INIT_OUTSIDE_CTOR on the same line to make it clear that the MOZ_INIT_OUTSIDE_CTOR is part of the variable declaration?
Assignee | ||
Comment 8•9 years ago
|
||
sure we can i did this because we are breaching the 80 chars line limit.
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8765759 [details]
Bug 1278242 - ignore initialization check for members from SurfaceDescriptorX11.
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/60984/diff/2-3/
Comment 10•9 years ago
|
||
Comment on attachment 8765759 [details]
Bug 1278242 - ignore initialization check for members from SurfaceDescriptorX11.
https://reviewboard.mozilla.org/r/60984/#review57868
Attachment #8765759 -
Flags: review?(jmuizelaar) → review+
Whiteboard: CID 1362536, CID 1362537, CID 1362538, CID 1362539, CID 1362540, CID 1362541, CID 750461 → [gfx-noted] CID 1362536, CID 1362537, CID 1362538, CID 1362539, CID 1362540, CID 1362541, CID 750461
Comment hidden (mozreview-request) |
Comment 12•9 years ago
|
||
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3baee224bdd8
ignore initialization check for members from SurfaceDescriptorX11. r=jrmuizel
Comment 13•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Assignee | ||
Comment 15•9 years ago
|
||
This has no runtime impact since it's only for our static analysis builds.
Comment 16•9 years ago
|
||
ok, thanks
You need to log in
before you can comment on or make changes to this bug.
Description
•