OscillatorNodeEngine::mFinalFrequency is used uninitialised

RESOLVED FIXED in Firefox 44

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jseward, Unassigned)

Tracking

Trunk
mozilla44
Points:
---

Firefox Tracking Flags

(firefox44 fixed)

Details

Attachments

(2 attachments)

Reporter

Description

4 years ago
This might be fallout from bug 1209904.  That introduces the following
fragment

+    if (finalFrequency != mFinalFrequency) {
+      mFinalFrequency = finalFrequency;
+      return true;
+    }

but the problem is that OscillatorNodeEngine::OscillatorNodeEngine
doesn't give an initial value for mFinalFrequency, so the |if| condition
is undefined.

Comparing OscillatorNodeEngine::OscillatorNodeEngine with the list of
fields starting at OscillatorNode.cpp:382, it seems as if it has been
the intention of the constructor to initialise all fields, but that
both mFinalFrequency and mPhaseIncrement were forgotten about.
Reporter

Comment 1

4 years ago
STR: with an --enable-valgrind --disable-jemalloc build, run

./mach mochitest --valgrind=/usr/bin/valgrind \
   dom/media/webaudio/test/test_delayNodeTailWithDisconnect.html
Reporter

Comment 2

4 years ago
Posted file Valgrind complaint
Comment on attachment 8675590 [details] [diff] [review]
Initialise all fields in the constructor of OscillatorNodeEngine

Review of attachment 8675590 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks !
Attachment #8675590 - Flags: review?(padenot) → review+

Comment 6

4 years ago
backoutbugherdermerge
https://hg.mozilla.org/mozilla-central/rev/4aa9e709ddf7
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.