#24 new-delete-type-mismatch in KMail system tray code

Open
opened 10 months ago by luke-jr · 3 comments

Not really sure what's going on here, but I guess some type needs a virtual destructor?

==23759==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x6030071639e0 in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   32 bytes;
  size of the deallocated type: 16 bytes.
    #0 0x7f3f841bfef7 in operator delete(void*, unsigned long) /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libsanitizer/asan/asan_new_delete.cc:151
    #1 0x7f3f832d36b8 in 	<TQGuardedPtr<KMFolder>, bool>::TQMapIterator(TQMapNode<TQGuardedPtr<KMFolder>, bool>*) /usr/include/tqt3/ntqmap.h:127
    #2 0x7f3f832d36b8 in TQMapPrivate<TQGuardedPtr<KMFolder>, bool>::end() /usr/include/tqt3/ntqmap.h:382
    #3 0x7f3f832d36b8 in TQMap<TQGuardedPtr<KMFolder>, bool>::end() /usr/include/tqt3/ntqmap.h:669
    #4 0x7f3f832d36b8 in KMSystemTray::updateNewMessages() /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmsystemtray.cpp:488
    #5 0x7f3f8311a926 in KMMsgDict::openFolderIds(FolderStorage const&, bool) /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmmsgdict.cpp:510
    #6 0x7f3f833e87de in TQValueListIterator<TDEABC::Addressee>::operator++() /usr/include/tqt3/ntqvaluelist.h:115
    #7 0x7f3f833e87de in KabcBridge::categories() /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmaddrbook.cpp:124
    #8 0x7f3f833e8c8d in TQValueListPrivate<TDEABC::Addressee>::~TQValueListPrivate() /usr/include/tqt3/ntqvaluelist.h:275
    #9 0x7f3f833e8c8d in TQValueList<TDEABC::Addressee>::~TQValueList() /usr/include/tqt3/ntqvaluelist.h:452
    #10 0x7f3f833e8c8d in KabcBridge::categories() /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmaddrbook.cpp:120
    #11 0x7f3f8328c1d0 in TQValueListPrivate<int>::insert(TQValueListIterator<int>, int const&) /usr/include/tqt3/ntqvaluelist.h:287
    #12 0x7f3f8328c1d0 in TQValueList<int>::append(int const&) /usr/include/tqt3/ntqvaluelist.h:543
    #13 0x7f3f8328c1d0 in TQValueList<int>::operator<<(int const&) /usr/include/tqt3/ntqvaluelist.h:504
    #14 0x7f3f8328c1d0 in FolderStorage::addMsg(TQPtrList<KMMessage>&, TQValueList<int>&) /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/folderstorage.cpp:1169
    #15 0x7f3f83391d5f in KMFolderImap::slotListFolderEntries(TDEIO::Job*, TQValueList<TQValueList<TDEIO::UDSAtom> > const&) /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmfolderimap.cpp:1376
    #16 0x7f3f833a608a in TQMapIterator<TQString, TQStringList>::TQMapIterator(TQMapIterator<TQString, TQStringList> const&) /usr/include/tqt3/ntqmap.h:128
    #17 0x7f3f833a608a in TQMapPrivate<TQString, TQStringList>::insertSingle(TQString const&) /usr/include/tqt3/ntqmap.h:549
    #18 0x7f3f816a2bb7 in TQObject::activate_signal(TQConnectionList*, TQUObject*) kernel/qobject.cpp:2813
    #19 0x7f3f7a03802e in TDEIO::Job::result(TDEIO::Job*) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999_build/tdeio/tdeio/jobclasses.moc:173
    #20 0x7f3f7a0382c5 in TDEIO::Job::emitResult() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/job.cpp:235
    #21 0x7f3f7a05d4a4 in TDEIO::SimpleJob::slotFinished() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/job.cpp:601
    #22 0x7f3f7a0713f2 in TDEIO::ListJob::slotFinished() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/job.cpp:2164
    #23 0x7f3f7a08cd48 in TDEIO::ListJob::tqt_invoke(int, TQUObject*) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999_build/tdeio/tdeio/jobclasses.moc:1915
    #24 0x7f3f816a2bb7 in TQObject::activate_signal(TQConnectionList*, TQUObject*) kernel/qobject.cpp:2813
    #25 0x7f3f816a2d9c in TQObject::activate_signal(int) kernel/qobject.cpp:2747
    #26 0x7f3f7a00af94 in TDEIO::SlaveInterface::dispatch(int, TQMemArray<char> const&) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/slaveinterface.cpp:243
    #27 0x7f3f7a002651 in TDEIO::SlaveInterface::dispatch() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/slaveinterface.cpp:173
    #28 0x7f3f79ffce1b in TDEIO::Slave::gotInput() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/slave.cpp:300
    #29 0x7f3f7a001f6e in TDEIO::Slave::tqt_invoke(int, TQUObject*) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999_build/tdeio/tdeio/slave.moc:124
    #30 0x7f3f816a2bb7 in TQObject::activate_signal(TQConnectionList*, TQUObject*) kernel/qobject.cpp:2813
    #31 0x7f3f816a2efc in TQObject::activate_signal(int, int) kernel/qobject.cpp:2977
    #32 0x7f3f816c4631 in TQSocketNotifier::event(TQEvent*) kernel/qsocketnotifier.cpp:261
    #33 0x7f3f81644e6c in TQApplication::internalNotify(TQObject*, TQEvent*) kernel/qapplication.cpp:2883
    #34 0x7f3f816454b6 in TQApplication::notify(TQObject*, TQEvent*) kernel/qapplication.cpp:2726
    #35 0x7f3f8227ea6c in TDEApplication::notify(TQObject*, TQEvent*) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdecore/tdeapplication.cpp:660
    #36 0x7f3f8163a707 in TQEventLoop::activateSocketNotifiers() kernel/qeventloop_unix.cpp:588
    #37 0x7f3f81624c11 in TQEventLoop::processEvents(unsigned int) kernel/qeventloop_x11.cpp:390
    #38 0x7f3f8165bdde in TQEventLoop::enterLoop() kernel/qeventloop.cpp:227
    #39 0x7f3f8165bd21 in TQEventLoop::exec() kernel/qeventloop.cpp:174
    #40 0x564bb13edbb8 in main (/usr/trinity/14/bin/kmail+0x3bb8)
    #41 0x7f3f80b89850 in __libc_start_main ../csu/libc-start.c:308
    #42 0x564bb13edd79 in _start (/usr/trinity/14/bin/kmail+0x3d79)

0x6030071639e0 is located 0 bytes inside of 32-byte region [0x6030071639e0,0x603007163a00)
allocated by thread T0 here:
    #0 0x7f3f841be557 in operator new(unsigned long) /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libsanitizer/asan/asan_new_delete.cc:90
    #1 0x7f3f8311d5a6 in TQValueListPrivate<unsigned long>::TQValueListPrivate(TQValueListPrivate<unsigned long> const&) /usr/include/tqt3/ntqvaluelist.h:262
    #2 0x616000520e7f  (<unknown module>)
Not really sure what's going on here, but I guess some type needs a virtual destructor? ``` ==23759==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x6030071639e0 in thread T0: object passed to delete has wrong type: size of the allocated type: 32 bytes; size of the deallocated type: 16 bytes. #0 0x7f3f841bfef7 in operator delete(void*, unsigned long) /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libsanitizer/asan/asan_new_delete.cc:151 #1 0x7f3f832d36b8 in <TQGuardedPtr<KMFolder>, bool>::TQMapIterator(TQMapNode<TQGuardedPtr<KMFolder>, bool>*) /usr/include/tqt3/ntqmap.h:127 #2 0x7f3f832d36b8 in TQMapPrivate<TQGuardedPtr<KMFolder>, bool>::end() /usr/include/tqt3/ntqmap.h:382 #3 0x7f3f832d36b8 in TQMap<TQGuardedPtr<KMFolder>, bool>::end() /usr/include/tqt3/ntqmap.h:669 #4 0x7f3f832d36b8 in KMSystemTray::updateNewMessages() /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmsystemtray.cpp:488 #5 0x7f3f8311a926 in KMMsgDict::openFolderIds(FolderStorage const&, bool) /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmmsgdict.cpp:510 #6 0x7f3f833e87de in TQValueListIterator<TDEABC::Addressee>::operator++() /usr/include/tqt3/ntqvaluelist.h:115 #7 0x7f3f833e87de in KabcBridge::categories() /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmaddrbook.cpp:124 #8 0x7f3f833e8c8d in TQValueListPrivate<TDEABC::Addressee>::~TQValueListPrivate() /usr/include/tqt3/ntqvaluelist.h:275 #9 0x7f3f833e8c8d in TQValueList<TDEABC::Addressee>::~TQValueList() /usr/include/tqt3/ntqvaluelist.h:452 #10 0x7f3f833e8c8d in KabcBridge::categories() /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmaddrbook.cpp:120 #11 0x7f3f8328c1d0 in TQValueListPrivate<int>::insert(TQValueListIterator<int>, int const&) /usr/include/tqt3/ntqvaluelist.h:287 #12 0x7f3f8328c1d0 in TQValueList<int>::append(int const&) /usr/include/tqt3/ntqvaluelist.h:543 #13 0x7f3f8328c1d0 in TQValueList<int>::operator<<(int const&) /usr/include/tqt3/ntqvaluelist.h:504 #14 0x7f3f8328c1d0 in FolderStorage::addMsg(TQPtrList<KMMessage>&, TQValueList<int>&) /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/folderstorage.cpp:1169 #15 0x7f3f83391d5f in KMFolderImap::slotListFolderEntries(TDEIO::Job*, TQValueList<TQValueList<TDEIO::UDSAtom> > const&) /var/tmp/portage/trinity-base/kmail-9999/work/kmail-9999/kmail/kmfolderimap.cpp:1376 #16 0x7f3f833a608a in TQMapIterator<TQString, TQStringList>::TQMapIterator(TQMapIterator<TQString, TQStringList> const&) /usr/include/tqt3/ntqmap.h:128 #17 0x7f3f833a608a in TQMapPrivate<TQString, TQStringList>::insertSingle(TQString const&) /usr/include/tqt3/ntqmap.h:549 #18 0x7f3f816a2bb7 in TQObject::activate_signal(TQConnectionList*, TQUObject*) kernel/qobject.cpp:2813 #19 0x7f3f7a03802e in TDEIO::Job::result(TDEIO::Job*) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999_build/tdeio/tdeio/jobclasses.moc:173 #20 0x7f3f7a0382c5 in TDEIO::Job::emitResult() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/job.cpp:235 #21 0x7f3f7a05d4a4 in TDEIO::SimpleJob::slotFinished() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/job.cpp:601 #22 0x7f3f7a0713f2 in TDEIO::ListJob::slotFinished() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/job.cpp:2164 #23 0x7f3f7a08cd48 in TDEIO::ListJob::tqt_invoke(int, TQUObject*) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999_build/tdeio/tdeio/jobclasses.moc:1915 #24 0x7f3f816a2bb7 in TQObject::activate_signal(TQConnectionList*, TQUObject*) kernel/qobject.cpp:2813 #25 0x7f3f816a2d9c in TQObject::activate_signal(int) kernel/qobject.cpp:2747 #26 0x7f3f7a00af94 in TDEIO::SlaveInterface::dispatch(int, TQMemArray<char> const&) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/slaveinterface.cpp:243 #27 0x7f3f7a002651 in TDEIO::SlaveInterface::dispatch() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/slaveinterface.cpp:173 #28 0x7f3f79ffce1b in TDEIO::Slave::gotInput() /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdeio/tdeio/slave.cpp:300 #29 0x7f3f7a001f6e in TDEIO::Slave::tqt_invoke(int, TQUObject*) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999_build/tdeio/tdeio/slave.moc:124 #30 0x7f3f816a2bb7 in TQObject::activate_signal(TQConnectionList*, TQUObject*) kernel/qobject.cpp:2813 #31 0x7f3f816a2efc in TQObject::activate_signal(int, int) kernel/qobject.cpp:2977 #32 0x7f3f816c4631 in TQSocketNotifier::event(TQEvent*) kernel/qsocketnotifier.cpp:261 #33 0x7f3f81644e6c in TQApplication::internalNotify(TQObject*, TQEvent*) kernel/qapplication.cpp:2883 #34 0x7f3f816454b6 in TQApplication::notify(TQObject*, TQEvent*) kernel/qapplication.cpp:2726 #35 0x7f3f8227ea6c in TDEApplication::notify(TQObject*, TQEvent*) /var/tmp/portage/trinity-base/tdelibs-9999/work/tdelibs-9999/tdecore/tdeapplication.cpp:660 #36 0x7f3f8163a707 in TQEventLoop::activateSocketNotifiers() kernel/qeventloop_unix.cpp:588 #37 0x7f3f81624c11 in TQEventLoop::processEvents(unsigned int) kernel/qeventloop_x11.cpp:390 #38 0x7f3f8165bdde in TQEventLoop::enterLoop() kernel/qeventloop.cpp:227 #39 0x7f3f8165bd21 in TQEventLoop::exec() kernel/qeventloop.cpp:174 #40 0x564bb13edbb8 in main (/usr/trinity/14/bin/kmail+0x3bb8) #41 0x7f3f80b89850 in __libc_start_main ../csu/libc-start.c:308 #42 0x564bb13edd79 in _start (/usr/trinity/14/bin/kmail+0x3d79) 0x6030071639e0 is located 0 bytes inside of 32-byte region [0x6030071639e0,0x603007163a00) allocated by thread T0 here: #0 0x7f3f841be557 in operator new(unsigned long) /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libsanitizer/asan/asan_new_delete.cc:90 #1 0x7f3f8311d5a6 in TQValueListPrivate<unsigned long>::TQValueListPrivate(TQValueListPrivate<unsigned long> const&) /usr/include/tqt3/ntqvaluelist.h:262 #2 0x616000520e7f (<unknown module>) ```
MicheleC commented 10 months ago
Owner

Hi Luke, is there a way to reproduce this systematically? could you share the required steps? Thanks.

Hi Luke, is there a way to reproduce this systematically? could you share the required steps? Thanks.
luke-jr commented 10 months ago
Poster

It seems to occur at startup when built with GCC 8.2.0 and -fsanitize=address

It seems to occur at startup when built with GCC 8.2.0 and -fsanitize=address
MicheleC commented 10 months ago
Owner

ok, thanks for the info.

ok, thanks for the info.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.