Closed Bug 1228339 Opened 5 years ago Closed 5 years ago

[Static Analysis][Uninitialized Members In Class] Class MmapWrapper from LulElf.cpp has some uninitialized memebers


(Core :: Gecko Profiler, defect)

Not set



Tracking Status
firefox45 --- fixed


(Reporter: andi, Assigned: andi)


(Blocks 1 open bug)


(Keywords: coverity, Whiteboard: CID 1340243)


(1 file, 1 obsolete file)

The Static Analysis tool Coverity detected that class MmapWrapper has memebers: base and size_ uninitialized.
Attached patch Bug 1228339.diff (obsolete) — Splinter Review
Hello David,

Could you please take a look other this small patch and tell me if everything is ok? It's not much, there are only 2 inits in the constructor.

Attachment #8692532 - Flags: review?(dbaron)
Whiteboard: CID 1340243
Attachment #8692532 - Flags: review?(dbaron) → review?(jseward)
Comment on attachment 8692532 [details] [diff] [review]
Bug 1228339.diff

Review of attachment 8692532 [details] [diff] [review]:

Is not strictly necessary.  But if it keeps CV happy, I'm fine with it.
Attachment #8692532 - Flags: review?(jseward) → review+
Keywords: checkin-needed
The actual error was:

/home/worker/workspace/gecko/tools/profiler/lul/LulElf.cpp:145:10: error: '{anonymous}::MmapWrapper::size_' will be initialized after [-Werror=reorder]
/home/worker/workspace/gecko/tools/profiler/lul/LulElf.cpp:144:9: error:   'void* {anonymous}::MmapWrapper::base_' [-Werror=reorder]
/home/worker/workspace/gecko/tools/profiler/lul/LulElf.cpp:123:3: error:   when initialized here [-Werror=reorder]
Attached patch Bug 1228339.diffSplinter Review
I've fixed the issue, can you please check-in?
Attachment #8692532 - Attachment is obsolete: true
Keywords: checkin-needed
While you're at it, can you check your hg settings? The patch is missing an author. If you look at the commit in m-i, the author was garbled there too: Bogdan Postelnicu <bogdan.postelnicu>

You probably want a username= in your .hgrc, as well as set the qnew defaults to -Ue. See our docs:
Thank you, is the patch ok?
It's running on try now, we'll see. (The author info is missing but whoever checks it in might be able to fix that on the go)
Thank you for the info it's strange that the author is missing maybe because i'm using TortoiseHG
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.