Skip to content

Fix data race in QCoreApplicationPrivate::sendThroughApplicationEventFilters()

Andreas Sturmlechner requested to merge asturmlechner/qtbase:datarace into kde/5.15

The assertion has the acquire fence at the wrong place:

  • QThreadData::thread isn't dereferenced, so the acquire fence on its load() isn't needed.

  • QObjectPrivate::threadData, however, is dereferenced, so an acquire fence is needed; the relaxed load() is insufficient.

Swapping the loadAcquire() and the loadRelaxed() fixes both issues.

Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Iee964490e93ebc323c188e616bf0d448f91fb2b5 Reviewed-by: Fabian Kosmale fabian.kosmale@qt.io (cherry picked from commit 0da17e83)

Merge request reports