Closed Bug 1228339 Opened 4 years ago Closed 4 years ago

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

Categories

(Core :: Gecko Profiler, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1340243)

Attachments

(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.

THX
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: https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
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
https://hg.mozilla.org/mozilla-central/rev/984115c3af75
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.