Segfault in kdecore's mALLOc

Julian Rockey linux at
Mon Sep 29 09:24:02 UTC 2003

Has anyone else come across the following segfault when running a project in 
KDevelop (HEAD)?

It looked to me like one of those something's-not-linked-right problems, but 
despite rebuilding QT, kdelibs and kdevelop from scratch the fault still 
consistently happens in the same place (and nowhere else). I'm compiling 
against QT 3.1.2 / KDE 3.1.4 (from Gentoo).

 I am convinced it's not a Gideon code error, as the fault is happening deep 
within QT during heap allocation - and I am wondering is this mALLOc function 
in kdecore is perhaps a malloc() replacement / optimisation that was enabled 
by Gentoo. However, it is odd that this is the only place it happens, and 
that it happens so consistently, and that the rest of my KDE is rock stable.


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 12795)]
0x40d78230 in mALLOc () from /usr/kde/3.1/lib/
(gdb) bt
#0  0x40d78230 in mALLOc () from /usr/kde/3.1/lib/
#1  0x40d77b3d in malloc () from /usr/kde/3.1/lib/
#2  0x416f3a9c in operator new(unsigned) () from 
#3  0x4131546f in QString::QString(int, bool) () from 
#4  0x413196f0 in QString::mid(unsigned, unsigned) const () from 
#5  0x41328f57 in QStringList::split(QString const&, QString const&, bool) () 
from /usr/qt/3/lib/
#6  0x41328dcb in QStringList::split(QChar const&, QString const&, bool) () 
from /usr/qt/3/lib/
#7  0x405d27d0 in DomUtil::elementByPath(QDomDocument const&, QString const&) 
(doc=@0x822bbd0, path=@0xbfffe820) at domutil.cpp:30
#8  0x405d2942 in DomUtil::readEntry(QDomDocument const&, QString const&, 
QString const&) (doc=@0x822bbd0, path=@0xbfffe820,
    defaultEntry=@0x80b948c) at domutil.cpp:45
#9  0x424c4121 in AutoProjectPart::runDirectory() const (this=0x866d4c8) at 
#10 0x424c8e98 in AutoProjectPart::slotExecute2() (this=0x866d4c8) at 
#11 0x424c890d in AutoProjectPart::slotExecute() (this=0x866d4c8) at 
#12 0x424c9504 in AutoProjectPart::slotCommandFinished(QString const&) 
(this=0x866d4c8, command=@0x8c38c18)
    at autoprojectpart.cpp:1086
#13 0x424c9af2 in AutoProjectPart::qt_invoke(int, QUObject*) (this=0x866d4c8, 
_id=18, _o=0xbfffeb40) at autoprojectpart.moc:144
#14 0x41098299 in QObject::activate_signal(QConnectionList*, QUObject*) () 
from /usr/qt/3/lib/
#15 0x41098565 in QObject::activate_signal(int, QString) () from 
#16 0x405abf30 in KDevMakeFrontend::commandFinished(QString const&) 
(this=0x81f2140, t0=@0x81fe4d0) at kdevmakefrontend.moc:90
#17 0x41bc5b9a in MakeWidget::slotProcessExited(KProcess*) (this=0x81fe2d8) at 
#18 0x41bc7271 in MakeWidget::qt_invoke(int, QUObject*) (this=0x81fe2d8, 
_id=156, _o=0xbfffecc0) at makewidget.moc:155
#19 0x41098299 in QObject::activate_signal(QConnectionList*, QUObject*) () 
from /usr/qt/3/lib/
#20 0x40cb0bc2 in KProcess::processExited(KProcess*) () from 
#21 0x40caf71d in KProcess::processHasExited(int) () from 
#22 0x40cb238c in KProcessController::slotDoHousekeeping(int) () from 
#23 0x40cb2b47 in KProcessController::qt_invoke(int, QUObject*) () from 
#24 0x41098299 in QObject::activate_signal(QConnectionList*, QUObject*) () 
from /usr/qt/3/lib/
#25 0x41098375 in QObject::activate_signal(int, int) () from 
#26 0x413797a2 in QSocketNotifier::activated(int) () from 
#27 0x410b48e0 in QSocketNotifier::event(QEvent*) () from 
#28 0x4103a4c4 in QApplication::internalNotify(QObject*, QEvent*) () from 
#29 0x41039a3b in QApplication::notify(QObject*, QEvent*) () from 
#30 0x40c6e7d9 in KApplication::notify(QObject*, QEvent*) () from 
#31 0x410151da in QEventLoop::activateSocketNotifiers() () from 
#32 0x40ff2897 in QEventLoop::processEvents(unsigned) () from 
#33 0x4104e2c6 in QEventLoop::enterLoop() () from /usr/qt/3/lib/
#34 0x4104e168 in QEventLoop::exec() () from /usr/qt/3/lib/
#35 0x4103a6f1 in QApplication::exec() () from /usr/qt/3/lib/
#36 0x0806ad33 in main (argc=1, argv=0xbffff524) at main.cpp:126
#37 0x417627a7 in __libc_start_main () from /lib/

More information about the KDevelop-devel mailing list