qt5base-lts/tests/auto
Ievgenii Meshcheriakov 52ad59f9ea QThread: Reset the system thread ID when thread exits on Unix
Unix QThread implementation stores pthread_t as a system thread ID
when the thread is created, but never resets the system ID when
those threads are destroyed. Some implementations may reuse the
same thread IDs for new threads, and this may cause QThread::wait()
to erroneously complain that "Thread tried to wait on itself".

This patch sets the system thread ID to nullptr when the thread is
about to exit and be destroyed by the system.

A regression test is added to tst_qthread.

Fixes: QTBUG-96846
Pick-to: 5.15 6.2
Change-Id: I0850425dd0e09af50e59c9038e7e662a2a624beb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-09-29 01:53:49 +02:00
..
bic/data Add binary compatibility files for 6.1 2021-09-03 13:41:25 +00:00
cmake CMake: Bump almost all cmake_minimum_required calls to 3.16 2021-09-22 19:36:49 +02:00
concurrent Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
corelib QThread: Reset the system thread ID when thread exits on Unix 2021-09-29 01:53:49 +02:00
dbus tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
gui Preserve QImage metadata when converting format with color table 2021-09-28 15:59:31 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network QLocalSocket: reorder device closing 2021-09-21 21:40:27 +00:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Add testing of QPdfWriter output to QPainter lancelot test 2021-09-28 17:06:57 +02:00
printsupport Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
testlib Add missing dependencies of tests on their helper programs 2021-09-17 12:57:25 +02:00
tools Support QNX QCC compiler 2021-09-16 20:54:17 +03:00
widgets Don't clear focus if setParent doesn't change the parent 2021-09-28 17:42:57 +02:00
xml tst_qdom: clean-up the code enabled only before Qt 6 2021-01-15 15:22:08 +01:00
CMakeLists.txt CMake: Build a subset of tests when targeting iOS in the CI 2021-08-26 16:40:15 +02:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00