[Bug 302498] New: fontconfig leaks
https://bugzilla.novell.com/show_bug.cgi?id=302498 Summary: fontconfig leaks Product: openSUSE 10.3 Version: Beta 1 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: mfabian@novell.com ReportedBy: dmueller@novell.com QAContact: qa@suse.de Found By: --- fontconfig has memory leaks while reading our configuration: $valgrind --leak-check=yes fc-match 'monospace' ==29822== 225 bytes in 10 blocks are definitely lost in loss record 1 of 1 ==29822== at 0x4022875: malloc (vg_replace_malloc.c:207) ==29822== by 0x4114E17: FcStrCopy (fcstr.c:42) ==29822== by 0x41184A4: FcEndElement (fcxml.c:1916) ==29822== by 0x40E2179: (within /lib/libexpat.so.1.5.2) ==29822== by 0x40E2F1C: (within /lib/libexpat.so.1.5.2) ==29822== by 0x40DC7BB: XML_ParseBuffer (in /lib/libexpat.so.1.5.2) ==29822== by 0x4117649: FcConfigParseAndLoad (fcxml.c:2486) ==29822== by 0x411792A: FcConfigParseAndLoad (fcxml.c:2372) ==29822== by 0x4117CC1: FcEndElement (fcxml.c:1612) ==29822== by 0x40E2179: (within /lib/libexpat.so.1.5.2) ==29822== by 0x40E2F1C: (within /lib/libexpat.so.1.5.2) ==29822== by 0x40E3A97: (within /lib/libexpat.so.1.5.2) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=302498#c1 --- Comment #1 from Dirk Mueller <dmueller@novell.com> 2007-08-22 07:03:08 MST --- I've tried myself with this patch: --- src/fcxml.c +++ src/fcxml.c @@ -1979,6 +1979,7 @@ FcParsePatelt (FcConfigParse *parse) FcConfigMessage (parse, FcSevereError, "out of memory"); break; } + FcValueDestroy (value); } FcVStackPushPattern (parse, pattern); but it doesn't seem to work. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=302498#c2 --- Comment #2 from Dirk Mueller <dmueller@novell.com> 2007-08-22 07:04:49 MST --- there is another, unrelated to that one: --- src/fcpat.c +++ src/fcpat.c @@ -340,11 +340,13 @@ FcPatternElt * FcPatternObjectInsertElt (FcPattern *p, FcObject object) { int i; - FcPatternElt *e; i = FcPatternObjectPosition (p, object); if (i < 0) { + FcPatternElt *e; + + e = FcPatternElts(p); i = -i - 1; /* reallocate array */ @@ -353,7 +355,7 @@ FcPatternObjectInsertElt (FcPattern *p, FcObject object) int s = p->size + 16; if (p->size) { - FcPatternElt *e0 = FcPatternElts(p); + FcPatternElt *e0 = e; e = (FcPatternElt *) realloc (e0, s * sizeof (FcPatternElt)); if (!e) /* maybe it was mmapped */ { @@ -377,8 +379,7 @@ FcPatternObjectInsertElt (FcPattern *p, FcObject object) p->size++; } } - - e = FcPatternElts(p); + /* move elts up */ memmove (e + i + 1, e + i, -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=302498#c3 --- Comment #3 from Peng Wu <pwu@novell.com> 2007-08-28 00:21:42 MST --- Created an attachment (id=160160) --> (https://bugzilla.novell.com/attachment.cgi?id=160160) fix the memory leak bug. Hi,Mike. Please try it. It works for me, hopes it will work for you. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=302498#c4 Peng Wu <pwu@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pwu@novell.com --- Comment #4 from Peng Wu <pwu@novell.com> 2007-08-28 21:55:22 MST --- I put the updated packages for openSUSE 10.2 on: http://download.opensuse.org/repositories/M17N/ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=302498 Dirk Mueller <dmueller@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Found By|--- |Development -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=302498 User crrodriguez@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=302498#c5 Cristian Rodríguez <crrodriguez@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crrodriguez@novell.com --- Comment #5 from Cristian Rodríguez <crrodriguez@novell.com> 2009-02-20 09:20:06 MST --- https://bugs.freedesktop.org/show_bug.cgi?id=17661 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=302498 Mike Fabian <mfabian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|mfabian@novell.com |hvogel@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=302498 User crrodriguez@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=302498#c6 Cristian Rodríguez <crrodriguez@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #6 from Cristian Rodríguez <crrodriguez@novell.com> 2009-02-23 12:30:00 MST --- fixed in STABLE, WONTFIX for older products. valgrind --leak-check=yes fc-match 'monospace' ==6316== Memcheck, a memory error detector. ==6316== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==6316== Using LibVEX rev 1854, a library for dynamic binary translation. ==6316== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==6316== Using valgrind-3.3.1, a dynamic binary instrumentation framework. ==6316== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==6316== For more details, rerun with: -v ==6316== DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book" ==6316== ==6316== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1) ==6316== malloc/free: in use at exit: 0 bytes in 0 blocks. ==6316== malloc/free: 10,246 allocs, 10,246 frees, 1,173,970 bytes allocated. ==6316== For counts of detected errors, rerun with: -v ==6316== All heap blocks were freed -- no leaks are possible. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com