QReadWriteLock: fix data race on the d_ptr members
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 28 May 2026 21:30:55 +0000 (21:30 +0000)
committerRaspbian forward porter <root@raspbian.org>
Thu, 28 May 2026 21:30:55 +0000 (21:30 +0000)
commit2a0a38a99dd6ec5243bb54334ad09f9b5d7612fb
tree178317f056a389713f7210c4c3b992a4be9d7a91
parent078b49223733b2f2c59ede7851ef23ff247a085b
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