diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-05-05 17:52:47 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-09 12:25:06 +0200 |
commit | 295786d946aed262b01f5941dcde72d68781f6c1 (patch) | |
tree | a8dcefe89dde5b7b16fd68863b2b4f46a0ebe1d1 /src/tools | |
parent | f85ab84414a5d40c710c9deabe0d9b89b4757ec5 (diff) |
Avoid corruption in Q(Open)GLFunctions when used on multiple threads
Using Q(Open)GLFunctions concurrently on multiple threads had some issues
due to incorrect synchronization: The m_groups list in the
QOpenGLMultiGroupSharedResource, in which the Q(Open)GLFunctions instance
is stored, became corrupted under certain scenarios, for example in the
tst_qglthreads autotest and any two threads that happen to enter an
initializeOpenGLFunctions() or QOpenGLContext::functions() call concurrently.
Locking in value() has been introduced in 666c25c089acf7fcc9e9a6b7665074c6286d604e
to fix such issues, however using the context group's mutex is not enough: that still
allows two threads using two contexts with a different context group to concurrently
enter insert(). Instead, the MultiGroupSharedResource has to have its own mutex
to protect its own member variables.
Task-number: QTBUG-38771
Change-Id: If01c44c2084b95e487bc9146576ca180ed8044da
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/tools')
0 files changed, 0 insertions, 0 deletions