<table><tr><td style="">vkrause created this revision.<br />Restricted Application added a project: KDE PIM.<br />Restricted Application added a subscriber: kde-pim.<br />vkrause requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14263">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Fixes a heap-use-after-free ASAN error when the ETMCalendar singleton is<br />
destroyed on shutdown.</p>

<h3 class="remarkup-header">14556==ERROR: AddressSanitizer: heap-use-after-free on address 0x603000139910 at pc 0x7fe6291391e3 bp 0x7fff0d420ec0 sp 0x7fff0d420eb8</h3>

<p>READ of size 8 at 0x603000139910 thread T0<br />
#0 0x7fe6291391e2 in Akonadi::ChangeNotificationDependenciesFactory::destroyNotificationConnection(Akonadi::Session*, Akonadi::Connection*) /home/jenkins/workspace/Applications akonadi kf5-qt5 SUSEQt5.9/src/core/changenotificationdependenciesfactory.cpp:51<br />
#1 0x7fe629301fcf in Akonadi::MonitorPrivate::disconnectFromNotificationManager() /home/jenkins/workspace/Applications akonadi kf5-qt5 SUSEQt5.9/src/core/monitor_p.cpp:120<br />
#2 0x7fe6293008f2 in Akonadi::MonitorPrivate::~MonitorPrivate() /home/jenkins/workspace/Applications akonadi kf5-qt5 SUSEQt5.9/src/core/monitor_p.cpp:66<br />
#3 0x7fe629300ef9 in Akonadi::MonitorPrivate::~MonitorPrivate() /home/jenkins/workspace/Applications akonadi kf5-qt5 SUSEQt5.9/src/core/monitor_p.cpp:71<br />
#4 0x7fe6292d5c91 in Akonadi::Monitor::~Monitor() /home/jenkins/workspace/Applications akonadi kf5-qt5 SUSEQt5.9/src/core/monitor.cpp:61<br />
#5 0x7fe6292d5cef in Akonadi::Monitor::~Monitor() /home/jenkins/workspace/Applications akonadi kf5-qt5 SUSEQt5.9/src/core/monitor.cpp:62<br />
#6 0x7fe61eebe29a in QObjectPrivate::deleteChildren() (/usr/lib64/libQt5Core.so.5+0x29b29a)<br />
#7 0x7fe61eec6de3 in QObject::~QObject() (/usr/lib64/libQt5Core.so.5+0x2a3de3)<br />
#8 0x7fe5dd5b5a33 in KCalCore::Calendar::~Calendar() /home/jenkins/workspace/Dependency Build Applications kf5-qt5 SUSEQt5.9/kcalcore/src/calendar.cpp:154<br />
#9 0x7fe5dd752127 in KCalCore::MemoryCalendar::~MemoryCalendar() /home/jenkins/workspace/Dependency Build Applications kf5-qt5 SUSEQt5.9/kcalcore/src/memorycalendar.cpp:144<br />
#10 0x7fe5de22bf7c in Akonadi::CalendarBase::~CalendarBase() /home/jenkins/workspace/Dependency Build Applications kf5-qt5 SUSEQt5.9/akonadi-calendar/src/calendarbase.cpp:427<br />
#11 0x7fe5de28d1cc in Akonadi::ETMCalendar::~ETMCalendar() /home/jenkins/workspace/Dependency Build Applications kf5-qt5 SUSEQt5.9/akonadi-calendar/src/etmcalendar.cpp:505<br />
#12 0x7fe5de28d21d in Akonadi::ETMCalendar::~ETMCalendar() /home/jenkins/workspace/Dependency Build Applications kf5-qt5 SUSEQt5.9/akonadi-calendar/src/etmcalendar.cpp:507<br />
#13 0x7fe5dfb473b7 in QtSharedPointer::CustomDeleter<Akonadi::ETMCalendar, QtSharedPointer::NormalDeleter>::execute() (/home/jenkins/install-prefix/lib64/libKF5CalendarSupport.so.5+0x2b93b7)<br />
#14 0x7fe5dfb46bdb in QtSharedPointer::ExternalRefCountWithCustomDeleter<Akonadi::ETMCalendar, QtSharedPointer::NormalDeleter>::deleter(QtSharedPointer::ExternalRefCountData*) /usr/include/qt5/QtCore/qsharedpointer_impl.h:213<br />
#15 0x7fe5dfb2c9f7 in QtSharedPointer::ExternalRefCountData::destroy() /usr/include/qt5/QtCore/qsharedpointer_impl.h:157<br />
#16 0x7fe5dfb2f963 in QSharedPointer<Akonadi::ETMCalendar>::deref(QtSharedPointer::ExternalRefCountData*) /usr/include/qt5/QtCore/qsharedpointer_impl.h:461<br />
#17 0x7fe5dfb2f498 in QSharedPointer<Akonadi::ETMCalendar>::deref() /usr/include/qt5/QtCore/qsharedpointer_impl.h:456<br />
#18 0x7fe5dfb2d9dd in QSharedPointer<Akonadi::ETMCalendar>::~QSharedPointer() /usr/include/qt5/QtCore/qsharedpointer_impl.h:313<br />
#19 0x7fe61df697cb in __run_exit_handlers (/lib64/libc.so.6+0x3a7cb)</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R165 Akonadi </div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14263">https://phabricator.kde.org/D14263</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/sessionthread.cpp</div></div></div><br /><div><strong>To: </strong>vkrause<br /><strong>Cc: </strong>kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>