summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qtimer
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-08-29 14:24:52 -0300
committerThiago Macieira <thiago.macieira@intel.com>2022-09-15 19:58:45 -0300
commit22d4c67234fd152296c3ec98fc57526356a9f62b (patch)
treea2f289d1312c541ff608f40f5f746658a61e0dba /tests/auto/corelib/kernel/qtimer
parent7447d73327bbaec3aee0570a3120a1bb40b5e3b7 (diff)
QObject: attempt to fix a deadlock introduced by an earlier fix
Commit 71b4d4f150bc3c904a5aceec37513ddc3cd1c150 is likely the source of the issue. It fixed a race on disconnection, but kept the call to disconnectNotify() (which is user code) inside the locked section. My analysis is that by construction the sender object can't be undergoing concurrent deletion anyway at this point. All call sites (QObject::disconnect or the signal-slot activations but before the slot is activated) imply that the user code that reached here cannot itself be racing the deletion. There may be one race condition left: if the same signal was connected earlier to a slot via queued connection and that slot deletes the sender asynchronously. A synchronous deletion is handled by doActivate(), so the single-shot connection is never activated in the first place, but an asynchronous deletion could race past that check and delete the sender while QObjectPrivate::removeConnection is running. However, I'd call this a mistake in user code. [ChangeLog][QtCore][QObject] Fixed a regression from 6.3 that caused QObject::isSignalConnected() to deadlock if called from inside disconnectNotify(). Fixes: QTBUG-106025 Pick-to: 5.15 6.2 6.3 6.4 Change-Id: Ic6547f8247454b47baa8fffd170fe0bdb62cfcaf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'tests/auto/corelib/kernel/qtimer')
0 files changed, 0 insertions, 0 deletions