qt6-bb10/tests/auto/corelib
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
..
animation Avoid use after free in tst_qsequentialanimationgroup 2021-06-02 16:45:23 +02:00
global Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
io Revert "QProcess: do not emit aboutToClose() twice" 2021-09-24 05:57:47 +00:00
itemmodels emit layoutAboutToBeChanged timely 2021-07-20 21:27:27 +01:00
kernel tst_qmetatype: Fix operator< detection for std::optional 2021-09-21 19:27:50 +02:00
mimetypes Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
platform Android: Add runOnMainAndroidThread() under QNativeInterface 2021-05-26 23:24:11 +00:00
plugin Q{Elf,Mach}Parser: simplify the return codes 2021-09-24 20:16:05 -07:00
serialization Remove conditioning on Android embedded 2021-09-17 17:30:14 +02:00
text Add isValidUtf8() methods to QUtf8StringView and QByteArray{,View} 2021-09-22 15:40:30 +02:00
thread QThread: Reset the system thread ID when thread exits on Unix 2021-09-29 01:53:49 +02:00
time Fix QDateTimeParser's handling of 't' format to match serialization 2021-09-20 15:05:36 +02:00
tools Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
CMakeLists.txt Add tests for QAndroidApplication's sdkVersion and activity 2021-05-13 01:41:36 +03:00