Closed Bug 1240717 Opened 9 years ago Closed 9 years ago

[Static Analysis][Uninitialized pointer field] In function ProfilingFrameIterator::ProfilingFrameIterator(const WasmActivation&, const RegisterState&) from WasmFrameIterator.cpp

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1347204 )

Attachments

(1 file)

The Static Analysis tool Coverity added that pointer stackAddress_ is not initialized in the constructor in the following case: >> case CodeRange::Inline: { >> // The throw stub clears WasmActivation::fp on it's way out. >> if (!fp) { >> MOZ_ASSERT(done()); >> return; >> } We can see that pointer is initiliazed at the end of the switch(codeRange->kind()) block: >> codeRange_ = codeRange; >> stackAddress_ = state.sp; >> MOZ_ASSERT(!done()); It can be seen there that also pointer codeRange_ is attributed a value that was previously initialized at the beginning of the contructor. Even though this could not be a problem we could still initialized pointer stackAddress_ in the constructor same as codeRange_ with a nullptr.
Attachment #8709393 - Flags: review?(jorendorff) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: