qt6-bb10/tests/auto/corelib/thread
Thiago Macieira 1ed0dd88a3 QThread/Unix: make QThreadPrivate::finish() be called much later
We need it to run after all the thread-local destructors have run, to
ensure that some user code hasn't run after QThreadPrivate::finish() has
finished. We achieve that by making it get called from a thread-local
destructor itself, in the form of a qScopeGuard.

This ought to have been done since C++11 thread_local with non-trivial
destructors became available. However, it only started showing up after
commit 4a93285b16 began using thread_local
inside Qt itself. The visible symptom was that QThreadPrivate::finish()
had already destroyed the thread's event dispatcher, but some user code
ran later and expected it to still exist (or, worse, recreated it, via
QEventLoop → QThreadData::ensureEventDispatcher).

Fixes: QTBUG-117996
Pick-to: 6.7
Change-Id: I8f3ce163ccc5408cac39fffd178d682e5bfa6955
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-05-07 14:22:27 -07:00
..
qatomicint Change license for tests files 2024-02-04 09:56:42 +01:00
qatomicinteger Change license for tests files 2024-02-04 09:56:42 +01:00
qatomicpointer Change license for tests files 2024-02-04 09:56:42 +01:00
qfuture tst_qfuture: Update EXPECT_FAIL msvc condition 2024-03-18 14:59:26 +01:00
qfuturesynchronizer Change license for tests files 2024-02-04 09:56:42 +01:00
qfuturewatcher QFutureWatcher: Fix race for initial emission of resultReadyAt() 2024-03-15 11:42:36 +00:00
qmutex tst_QMutex[qnx]: increase system timer resolution 2024-03-12 14:23:57 +01:00
qmutexlocker Change license for tests files 2024-02-04 09:56:42 +01:00
qpromise Change license for tests files 2024-02-04 09:56:42 +01:00
qreadlocker Change license for tests files 2024-02-04 09:56:42 +01:00
qreadwritelock Change license for tests files 2024-02-04 09:56:42 +01:00
qresultstore Fix conversion warning in tst_qresultstore 2024-02-27 19:45:42 +01:00
qsemaphore Change license for tests files 2024-02-04 09:56:42 +01:00
qthread QThread/Unix: make QThreadPrivate::finish() be called much later 2024-05-07 14:22:27 -07:00
qthreadonce Change license for tests files 2024-02-04 09:56:42 +01:00
qthreadpool Change license for tests files 2024-02-04 09:56:42 +01:00
qthreadstorage Change license for tests files 2024-02-04 09:56:42 +01:00
qwaitcondition Change license for tests files 2024-02-04 09:56:42 +01:00
qwritelocker Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt Fix test compilation issues with QtLite configuration 2024-05-06 14:29:02 +00:00