Closed
Bug 1243359
Opened 5 years ago
Closed 5 years ago
[Static Analysis][Uninitialized scalar field] In function ScrollWheelInput::ScrollWheelInput
Categories
(Core :: Widget, defect)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1346310)
Attachments
(1 file)
The Static Analysis tool Coverity added that variable mScrollSeriesNumber is not initialized when constructor: >> ScrollWheelInput::ScrollWheelInput(const WidgetWheelEvent& aWheelEvent) get's called. This variable is initialed in the 2nd constructor: >> ScrollWheelInput(uint32_t aTime, >> TimeStamp aTimeStamp, >> Modifiers aModifiers, >> ScrollMode aScrollMode, >> ScrollDeltaType aDeltaType, >> const ScreenPoint& aOrigin, >> double aDeltaX, >> double aDeltaY) The only place where this variable is attributed a value outside of the 2nd constructor is: >> if (!mLastEventTime.IsNull() && >> (aEvent.mTimeStamp - mLastEventTime).ToMilliseconds() > kScrollSeriesTimeoutMs) >> { >> mScrollSeriesCounter = 0; >> } >> aEvent.mScrollSeriesNumber = ++mScrollSeriesCounter; The only place where this variable is used is in AsyncPanZoomController::GetScrollWheelDelta(const ScrollWheelInput& aEvent) const but i don't know for sure what constructor was used to build aEvent nor if it already passed through WheelBlockState::Update(ScrollWheelInput& aEvent).
Assignee | ||
Comment 1•5 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/32601/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/32601/
Attachment #8712653 -
Flags: review?(roc)
Updated•5 years ago
|
Component: Drag and Drop → Widget
Attachment #8712653 -
Flags: review?(roc) → review+
Comment on attachment 8712653 [details] MozReview Request: Bug 1243359 - initialize mScrollSeriesNumber in all ScrollWheelInput constructors. r?roc https://reviewboard.mozilla.org/r/32601/#review29529
Assignee | ||
Updated•5 years ago
|
Keywords: checkin-needed
Comment 3•5 years ago
|
||
this failed to apply: patching file widget/InputData.cpp Hunk #1 FAILED at 373 1 out of 1 hunks FAILED -- saving rejects to file widget/InputData.cpp.rej patch failed to apply abort: fix up the merge and run hg transplant --continue
Flags: needinfo?(bogdan.postelnicu)
Keywords: checkin-needed
Assignee | ||
Comment 4•5 years ago
|
||
i don't see why this would fail, i've applied it to the latest revision: from mozilla-central 281836 and it worked. Can you please givbe me more details?
Flags: needinfo?(bogdan.postelnicu) → needinfo?(cbook)
Assignee | ||
Comment 5•5 years ago
|
||
Comment on attachment 8712653 [details] MozReview Request: Bug 1243359 - initialize mScrollSeriesNumber in all ScrollWheelInput constructors. r?roc Review request updated; see interdiff: https://reviewboard.mozilla.org/r/32601/diff/1-2/
Assignee | ||
Updated•5 years ago
|
Flags: needinfo?(cbook)
Assignee | ||
Updated•5 years ago
|
Keywords: checkin-needed
Comment 7•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/13f6aa359a3c
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•