qt5base-lts/tests/auto
Volker Hilsheimer 3be99799a6 Don't access QObjectPrivate::declarativeData unguarded
The QObjectPrivate::declarativeData member is stored in a union with
currentChildBeingDeleted. The QObject destructor always sets the
currentChildBeingDeleted member of the union. It also sets the
isDeletingChildren bool, which is the only way to find out which union
member we can safely access.

While the QObject destructor is deleting children and isDeletingChildren
is set, we must not access the declarativeData member of the union.

Add a test case that initializes the function pointers for the
declarative handlers and constructs a situation where an object
emits a signal while it is destroying children.

Fixes: QTBUG-105286
Pick-to: 6.4 6.3 6.3.2 6.2 5.15
Change-Id: Iea5ba2f7843b6926a8d157be166e6044d98d6c02
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-08-20 03:55:12 +02:00
..
bic/data Add BiC data for the new way to do BiC testing 2022-05-12 13:33:41 +03:00
cmake CMake: Add simple widgets qmake iOS build test 2022-08-17 21:21:57 +02:00
concurrent Add license headers to cmake files 2022-08-03 17:14:55 +02:00
corelib Don't access QObjectPrivate::declarativeData unguarded 2022-08-20 03:55:12 +02:00
dbus qdbusxml2cpp: remove the old "In"-for-signal compatibility code 2022-08-16 16:05:25 -07:00
gui Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TO 2022-08-19 23:52:05 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network QSslServer: Re-enable read notifications when a client times out 2022-08-19 23:53:11 +02:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TO 2022-08-19 23:52:05 +02:00
printsupport qputenv: port to QByteArrayView 2022-08-06 14:21:46 +00:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
sql Add license headers to cmake files 2022-08-03 17:14:55 +02:00
testlib Fix DeferredFlag implementation for QTestEventLoop 2022-08-12 20:32:30 +02:00
tools qdbusxml2cpp: remove the old "In"-for-signal compatibility code 2022-08-16 16:05:25 -07:00
wasm Maintain the window z-order properly in wasm compositor 2022-08-16 16:08:38 +00:00
widgets Rename QT_DISABLE_DEPRECATED_BEFORE -> QT_DISABLE_DEPRECATED_UP_TO 2022-08-19 23:52:05 +02:00
xml QDomDocument: deprecate old setContent() overloads in favor of new ones 2022-08-17 17:02:27 +02:00
CMakeLists.txt Add license headers to cmake files 2022-08-03 17:14:55 +02:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00