KZoneAllocator static in KCompletion crashes on exit

Albert Astals Cid aacid at kde.org
Mon Feb 10 19:38:15 GMT 2014


El Dilluns, 10 de febrer de 2014, a les 12:14:31, Kevin Funk va escriure:
> Am Montag, 10. Februar 2014, 01:28:03 schrieb Thomas Lübking:
> > On Sonntag, 9. Februar 2014 22:16:16 CEST, Albert Astals Cid wrote:
> > > So while exiting krecipes i get
> > > 
> > > ==15297== Invalid read of size 8
> > > ==15297==    at 0xABE051C: QString::vsprintf(char const*,
> > > __va_list_tag*) (in
> > > /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
> > > ==15297==    by 0xAB87F94: qt_message(QtMsgType, char const*,
> > > __va_list_tag*) (in
> > > /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
> > > ==15297==    by 0xAB88190: qDebug(char const*, ...) (in
> > > /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
> > > ==15297==    by 0xA59AC14: KZoneAllocator::~KZoneAllocator()
> > > (kallocator.cpp:110)
> > 
> > https://git.reviewboard.kde.org/r/114715/ ?
> > 
> > Cheers,
> > Thomas
> 
> Hey Albert,
> 
> (Actually I replied much earlier, but KMail refused to send the mail
> somehow)
> 
> It's interesting that you can reproduce this on a Linux system, I never got
> that far.
> 
> What version of kdelibs are you running? This particular issue should indeed
> be fixed in v4.12.2 and KF5.

Actually it was only fixed for master (4.13) and KF5. I've now cherry-picked 
it to KDE/4.12 too since it fixes the crash i was getting.

Thanks!

Cheers,
  Albert

> The KZoneAllocator instance in KCompTreeNode
> got turned into 'static QSharedPointer<KZoneAllocator> alloc' member and
> KCompTreeNode instances are now keeping strong-refs to it to avoid the
> allocator (along its provided memory pool) being deleted too early.
> 
> I also replaced the qDebug usage with printfs because I got similar crashes
> at shutdown.
> 
> Greets





More information about the kde-core-devel mailing list