-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Return a local copy of m_cuePoints to avaoid a race condition #10976
Conversation
Please note that there are more occurrences were this illegal assumption about implicit sharing was used, e.g. |
Probably also the access to |
QFileInfo is implemented by QSharedDataPointer which is thread-safe, see: https://doc.qt.io/qt-5/qshareddatapointer.html#details |
Thanks for investigating. The Qt documentation is lacking. |
Nitpick: Explicitly assigning to a temporary, local variable is both redundant and uncommon when using a scoped lock primitive. This is legacy C-style and only causes noise. |
I recommend to leave comments about the thread-unsafe copy constructors of QList and QHash. |
Done |
This PR should be merged and released asap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
The QList copy constructor seems to be not thread-safe in case it is not already shared.
https://github.com/qt/qtbase/blob/d8efc8d718e3b3a0464f321e740541f5b221a5d6/src/corelib/tools/qlist.h#L809
This may be fix
#10956
#10689
With two backtraces, where a crash originates to the same function.