Data race in AudioSink::mWritten

RESOLVED FIXED in Firefox 42

Status

()

Core
Audio/Video
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jwwang, Assigned: jwwang)

Tracking

unspecified
mozilla42
Points:
---

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
1. mWritten is written at [1] on the audio thread without decoder monitor held.
2. mWritten is read at [2] on the state machine thread with decoder monitor held.

[1] https://hg.mozilla.org/mozilla-central/file/e7e69cc8c07b/dom/media/AudioSink.cpp#l217
[2] https://hg.mozilla.org/mozilla-central/file/e7e69cc8c07b/dom/media/AudioSink.cpp#l119
Blocks: 1137511
(Assignee)

Comment 2

3 years ago
Created attachment 8631935 [details] [diff] [review]
1181913_fix_mWritten_data_race_v1.patch

Make mWritten an Atomic<int64_t>.
Assignee: nobody → jwwang
Status: NEW → ASSIGNED
Attachment #8631935 - Flags: review?(kinetik)
Attachment #8631935 - Flags: review?(kinetik) → review+
(Assignee)

Comment 3

3 years ago
Thanks for the review!
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2e5a81baa18b
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.