Skip to content

KUiServerV2JobTracker: prevent potenial use-after-free

Méven Car requested to merge work/meven/bug-473625-2 into master

CCBUG: 471531

https://crash-reports.kde.org/organizations/kde/issues/3428/?alert_rule_id=2&alert_timestamp=1701200769134&alert_type=email&notification_uuid=4118bbf1-0410-4fa4-b148-7f71ddde3bca&project=4&referrer=alert_email

Replaces !42 (closed)

I suspect KUiServerV2JobTracker::finished can get called as KSharedUiServerV2Proxy::serverRegistered is running. KUiServerV2JobTracker is very asynchronous and any event can happen at anytime.

This trick is also used in QDBusPendingCallWatcher::finished. Not sure if that makes sense here though since we don't have an asynchronous treatment.

cc @nicolasfella

d->jobViews may need instead to be guarded with a QMutex. ( !47 (closed))

Edited by Méven Car

Merge request reports

Loading