QReadWriteLock: fix data race on the d_ptr members
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 18 Jun 2026 11:20:31 +0000 (14:20 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 18 Jun 2026 11:20:31 +0000 (14:20 +0300)
commitfdd90bb6b18fa905dcaaf99f9fe2e4105d6fa796
tree12df93a82c3f0f133eba285b2c1ca2c5a6f94e29
parent9c7a016806b6e40b38b6edf407f6abd7d34437c5
QReadWriteLock: fix data race on the d_ptr members

Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit?id=80d01c4ccb697b9d
Last-Update: 2025-12-14

The loadRelaxed() at the beginning of tryLockForRead/tryLockForWrite
isn't enough to bring us the non-atomic write of the recursive bool.
Same issue with the std::mutex itself.

Gbp-Pq: Name qreadwritelock_data_race.diff
src/corelib/thread/qreadwritelock.cpp