Closed Bug 1534238 Opened 6 years ago Closed 6 years ago

GraphRunner::Run can run before its constructor is finished

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P1)

65 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

Crash Data

Attachments

(1 file)

When this happens, mShutdown is uninitialized so GraphRunner::mThread runs to completion and exits, leaving any subsequent call to GraphRunner::OneIteration hanging.

Hmm, the symptoms here are actually a bit different, because I diagnosed this with a local patch to change [1] to say while (!mShutdown) {.

Instead the symptom on m-c should be that mStarted is set to true by GraphRunner::Run, then to false by the ctor, leaving both GraphRunner::OneIteration and GraphRunner::Run hanging.

[1] https://searchfox.org/mozilla-central/rev/2f1020dc4176d38dd5f3d0496f3c46849862ee0b/dom/media/GraphRunner.cpp#89

The thread may pre-empt the thread running the ctor and launch GraphRunner::Run
with uninitialized members. This patch ensures they are initialized first.

Rank: 9
Priority: -- → P1
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b015322cb779 Initialize GraphRunner::mThread last. r=padenot
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Crash Signature: [@ libc.so + 0x1c3dc]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: