KZoneAllocator static in KCompletion crashes on exit

Albert Astals Cid aacid at
Sun Feb 9 21:16:16 GMT 2014

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/
==15297==    by 0xAB87F94: qt_message(QtMsgType, char const*, __va_list_tag*) (in /usr/lib/x86_64-linux-gnu/
==15297==    by 0xAB88190: qDebug(char const*, ...) (in /usr/lib/x86_64-linux-gnu/
==15297==    by 0xA59AC14: KZoneAllocator::~KZoneAllocator() (kallocator.cpp:110)
==15297==    by 0xC2F8859: __cxa_finalize (cxa_finalize.c:56)
==15297==    by 0x5BA57A2: ??? (in /home/kdeunstable/instalado/lib/
==15297==    by 0x4010619: _dl_fini (dl-fini.c:252)
==15297==    by 0xC2F84C8: __run_exit_handlers (exit.c:82)
==15297==    by 0xC2F8514: exit (exit.c:104)
==15297==    by 0xC2DDEDB: (below main) (libc-start.c:321)
==15297==  Address 0x18774d10 is 0 bytes inside a block of size 8 free'd
==15297==    at 0x4C2BB5C: operator delete(void*) (vg_replace_malloc.c:502)
==15297==    by 0xACC6A9D: QTextCodecCleanup::~QTextCodecCleanup() (in /usr/lib/x86_64-linux-gnu/
==15297==    by 0xACC9C6B: QGlobalStaticDeleter<QTextCodecCleanup>::~QGlobalStaticDeleter() (in /usr/lib/x86_64-linux-gnu/
==15297==    by 0xC2F84C8: __run_exit_handlers (exit.c:82)
==15297==    by 0xC2F8514: exit (exit.c:104)
==15297==    by 0xC2DDEDB: (below main) (libc-start.c:321)

I guess this comes from the destruction of
    static KZoneAllocator alloc;
in KCompTreeNode

Any idea if/how we can fix it?
Convert the qDebug to a std::cerr?
Change the static to a different way?


More information about the kde-core-devel mailing list