Bug 172263 - AudioSourceProviderAVFObjC::m_tap member access is not thread safe.
Summary: AudioSourceProviderAVFObjC::m_tap member access is not thread safe.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-18 00:25 PDT by Per Arne Vollan
Modified: 2017-06-07 03:57 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.11 KB, patch)
2017-05-18 00:38 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2017-05-18 00:25:21 PDT
It it possible that the main thread will modify the m_tap member by calling AudioSourceProviderAVFObjC::destroyMix(), while m_tap is being read on a secondary thread in AudioSourceProviderAVFObjC::process().
Comment 1 Per Arne Vollan 2017-05-18 00:38:22 PDT
Created attachment 310493 [details]
Patch
Comment 2 Darin Adler 2017-06-06 13:54:50 PDT
Comment on attachment 310493 [details]
Patch

Can we construct a test case?
Comment 3 Per Arne Vollan 2017-06-07 03:29:10 PDT
(In reply to Darin Adler from comment #2)
> Comment on attachment 310493 [details]
> Patch
> 
> Can we construct a test case?

I have not been able to reproduce this. I believe the probability of two threads simultaneously accessing m_tap is (very) small.

Thanks for reviewing!
Comment 4 WebKit Commit Bot 2017-06-07 03:57:27 PDT
Comment on attachment 310493 [details]
Patch

Clearing flags on attachment: 310493

Committed r217878: <http://trac.webkit.org/changeset/217878>
Comment 5 WebKit Commit Bot 2017-06-07 03:57:28 PDT
All reviewed patches have been landed.  Closing bug.