diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-02-18 09:06:00 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-02-20 07:23:59 +0000 |
commit | 567abeaa04db2c30f0d9a5cb95e11d295ad88784 (patch) | |
tree | 71785686c622963394878eb7554869cf60697c2a /tests/auto/corelib/tools/qdate/tst_qdate.cpp | |
parent | 10d0f4cba99d2386db28a3afd71832e35992b797 (diff) |
QLoggingRegistry: fix potential data race
The 'rules' vector is made up of all the individual {env,config,...}Rules
vectors under mutex protection whenever init() is called (only from the
QCoreApplication ctor) or, at any time, by a call to QLoggingCategory::
setFilterRules().
Yet, the writes to the individual *Rules vectors were never protected by
registryMutex, racing against the reads of the same vectors in the
updateRules() function.
Fix by protecting all access of all member variables with registryMutex.
Add some strategic comments to make analysis easier for the next guy.
Change-Id: If68d15a553ec7038693574a34f10a39f4cd480e8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto/corelib/tools/qdate/tst_qdate.cpp')
0 files changed, 0 insertions, 0 deletions