QReadWriteLock: fix data race on the d_ptr members
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Tue, 5 May 2026 13:51:20 +0000 (16:51 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Tue, 5 May 2026 13:51:20 +0000 (16:51 +0300)
commitd07d5c319050891f2c877ca31b78eb2bca39ed65
tree341267956a475bebc43be9ae707b05ba6ffe729b
parenta7ee9d678345f41aa3b4eaba3320f57e7a445042
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