D6376: Fix double delete crash during shutdown
Christoph Cullmann
noreply at phabricator.kde.org
Sun Jun 25 12:35:27 UTC 2017
cullmann created this revision.
Restricted Application added a project: Frameworks.
REVISION SUMMARY
See:
https://bugs.kde.org/show_bug.cgi?id=380114
#6 0x00000000028c3780 in ?? ()
#7 0x00007fabbd75a4f6 in qDeleteAll<QList<Phonon::MediaObject*>::const_iterator> (end=..., begin=...) at /opt/local/include/qt5/QtCore/qalgorithms.h:320
#8 qDeleteAll<QList<Phonon::MediaObject*> > (c=...) at /opt/local/include/qt5/QtCore/qalgorithms.h:328
#9 NotifyByAudio::~NotifyByAudio (this=0x24ee390, __in_chrg=<optimized out>) at /opt/local/var/lnxports/build/_opt_local_site-ports_kf5_KF5-Frameworks/kf5-knotifications/work/knotifications-5.32.0/src/notifybyaudio.cpp:47
> IMHO that is a double delete, as all elements in m_reusablePhonons have this as parent:
=========================================================================================
if (m_reusablePhonons.isEmpty()) {
m = new Phonon::MediaObject(this);
...
> avoid to do deleteAll, which either is a nop, as nothing there or always double deletes.
==========================================================================================
TEST PLAN
make && make test, thought that seems not to really test this "race".
REPOSITORY
R289 KNotifications
REVISION DETAIL
https://phabricator.kde.org/D6376
AFFECTED FILES
src/notifybyaudio.cpp
To: cullmann, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170625/8b4a01d8/attachment.html>
More information about the Kde-frameworks-devel
mailing list