Bug 150131 - memory leak in konqueror QLabel::sizeForWidth(), khtml::Loader::slotFinished() and KonqMisc::createBrowserWindowFromProfile()
Summary: memory leak in konqueror QLabel::sizeForWidth(), khtml::Loader::slotFinished(...
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-23 23:54 UTC by Emil Karlson
Modified: 2011-06-23 17:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
full valgrind output (15.55 KB, text/plain)
2007-09-23 23:56 UTC, Emil Karlson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Karlson 2007-09-23 23:54:40 UTC
Version:           3.5.7-r3 (using KDE KDE 3.5.7)
Installed from:    Gentoo Packages
Compiler:          gcc-4.1.2 
OS:                Linux

just starting konqueror on valgrind, visiting for example kernel.org and closing konqueror properly using ctrl+q gives me:

==18057== 292 (52 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 205 of 287
==18057==    at 0x4A1FCC0: malloc (vg_replace_malloc.c:149)
==18057==    by 0x4DC8705: nss_parse_service_list (nsswitch.c:519)
==18057==    by 0x4DC8DDE: __nss_database_lookup (nsswitch.c:134)
==18057==    by 0xA4484AF: ???
==18057==    by 0xA449525: ???
==18057==    by 0x4D8E311: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:210)
==18057==    by 0x4D8DD48: getpwnam (getXXbyYY.c:116)
==18057==    by 0x5E23072: KUser::fillName(char const*) (kuser.cpp:123)
==18057==    by 0x5E231A2: KUser::KUser(KUser::UIDMode) (kuser.cpp:73)
==18057==    by 0x4BB0302: KonqMainWindow::initActions() (konq_mainwindow.cc:3917)
==18057==    by 0x4BB5A26: KonqMainWindow::KonqMainWindow(KURL const&, bool, char const*, QString const&) (konq_mainwindow.cc:218)
==18057==    by 0x4B859DA: KonqMisc::createBrowserWindowFromProfile(QString const&, QString const&, KURL const&, KParts::URLArgs const&, bool, QStringList const&, bool, bool) (konq_misc.cc:152)
==18057== 
==18057== 
==18057== 7,392 (3,144 direct, 4,248 indirect) bytes in 131 blocks are definitely lost in loss record 268 of 287
==18057==    at 0x4A204CC: operator new(unsigned long) (vg_replace_malloc.c:167)
==18057==    by 0xB1F3EC2: kjsyyparse() (grammar.y:173)
==18057==    by 0xB201290: KJS::Parser::parse(KJS::UChar const*, unsigned, KJS::SourceCode**, int*, KJS::UString*) (internal.cpp:490)
==18057==    by 0xB202A82: KJS::InterpreterImp::evaluate(KJS::UString const&, KJS::Value const&) (internal.cpp:832)
==18057==    by 0xB213C74: KJS::Interpreter::evaluate(KJS::UString const&, KJS::Value const&) (interpreter.cpp:166)
==18057==    by 0xAF761D0: KJS::KJSProxyImpl::evaluate(QString, int, QString const&, DOM::Node const&, KJS::Completion*) (kjs_proxy.cpp:164)
==18057==    by 0xADF2F80: KHTMLPart::executeScript(QString const&, int, DOM::Node const&, QString const&) (khtml_part.cpp:1155)
==18057==    by 0xAE55767: khtml::HTMLTokenizer::scriptExecution(QString const&, QString const&, int) (htmltokenizer.cpp:452)
==18057==    by 0xAE55EE7: khtml::HTMLTokenizer::notifyFinished(khtml::CachedObject*) (htmltokenizer.cpp:1755)
==18057==    by 0xAF16D27: khtml::CachedScript::checkNotify() (loader.cpp:369)
==18057==    by 0xAF1A1D7: khtml::CachedScript::data(QBuffer&, bool) (loader.cpp:361)
==18057==    by 0xAF198E1: khtml::Loader::slotFinished(KIO::Job*) (loader.cpp:1205)
==18057== 
==18057== 
==18057== 3,712 (1,536 direct, 2,176 indirect) bytes in 2 blocks are definitely lost in loss record 273 of 287
==18057==    at 0x4A1FD8E: realloc (vg_replace_malloc.c:306)
==18057==    by 0x7EEAF6D: (within /usr/lib64/libfontconfig.so.1.2.0)
==18057==    by 0x7EEB897: (within /usr/lib64/libfontconfig.so.1.2.0)
==18057==    by 0x7EE8C80: FcFontRenderPrepare (in /usr/lib64/libfontconfig.so.1.2.0)
==18057==    by 0x7EE8E0B: FcFontSetMatch (in /usr/lib64/libfontconfig.so.1.2.0)
==18057==    by 0x7EE8F8A: FcFontMatch (in /usr/lib64/libfontconfig.so.1.2.0)
==18057==    by 0x7DC8AF0: XftFontMatch (in /usr/lib64/libXft.so.2.1.2)
==18057==    by 0x640A02E: loadFontConfigFont(QFontPrivate const*, QFontDef const&, QFont::Script) (qfontdatabase_x11.cpp:1947)
==18057==    by 0x640EEB1: QFontDatabase::findFont(QFont::Script, QFontPrivate const*, QFontDef const&, int) (qfontdatabase.cpp:997)
==18057==    by 0x63A7233: QFontPrivate::load(QFont::Script) (qfont_x11.cpp:420)
==18057==    by 0x63A79BC: QFontMetrics::width(QChar) const (qfontdata_p.h:153)
==18057==    by 0x64DEA26: QLabel::sizeForWidth(int) const (qfontmetrics.h:80)

This mounts up to hundreds of Megabytes over time.
Comment 1 Emil Karlson 2007-09-23 23:56:55 UTC
Created attachment 21675 [details]
full valgrind output

full valgrind output, never mind the first 4 errors, they are from broken
glibc-2.6 on gentoo.
Comment 2 Martin Koller 2011-06-23 17:12:45 UTC
No longer valid in KDE 4.6.4