QCoreApplication: relax an atomic load in a Q_ASSERT()
A Q_ASSERT() must not have side-effects, incl. ordering memory. So the implicit loadAcquire() was too strong. The code must also work with loadRelaxed(), so use that. Amends the start of the public history. Pick-to: 6.10 Change-Id: Ib94bd0989d1a358b552275dc3963b014e6e4c180 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
5efcbf9fb8
commit
90dbb413bf
@ -1951,7 +1951,7 @@ void QCoreApplication::removePostedEvents(QObject *receiver, int eventType)
|
|||||||
|
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
if (receiver && eventType == 0) {
|
if (receiver && eventType == 0) {
|
||||||
Q_ASSERT(!receiver->d_func()->postedEvents);
|
Q_ASSERT(!receiver->d_func()->postedEvents.loadRelaxed());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user