Skip to content

Fix theoretical data race in Inject class #23805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cbjeukendrup
Copy link
Member

Includes #14790, so should wait on that PR

While concurrent reads don't need protection, and concurrent writes were protected by a mutex, the reads were not protected from the writes, because they didn't have a mutex. That is solved by this PR.

This problem was found using Thread Sanitizer. It is questionable though whether we should try to fix it, because it is unlikely to be a serious problem in practice, and the fix adds some overhead.

("very quickly" as in "keeping the keyboard shortcut pressed so that it fires repeatedly")

Or when quitting app during playback with mixer open
found using Thread Sanitizer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants