QReadWriteLock: fix data race on weakly-ordered memory architectures
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)
commit48cd194ace1b9d24f91bac4586a4fdb181156b46
treed642a82f38d6b1e37936268e3d0d183f03a302bb
parent2a0a38a99dd6ec5243bb54334ad09f9b5d7612fb
QReadWriteLock: fix data race on weakly-ordered memory architectures

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

The fix changes the relaxed load of d_ptr in lockFor{Read,Write} after
the acquire of the mutex to an acquire load, to establish
synchronization with the release store of d_ptr when converting from an
uncontended lock to a contended lock.

Gbp-Pq: Name qreadwritelock_data_race_2.diff
src/corelib/thread/qreadwritelock.cpp
tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp