[Fontconfig] Issues with current cvs

Ronny V. Vindenes ronnyvv at broadpark.no
Wed Jan 25 04:54:45 PST 2006


tir, 24,.01.2006 kl. 21.37 -0500, skrev Patrick Lam:
> Ronny V. Vindenes wrote:
> > The valgrind output from cairo cvs is gigantic, so I haven't had the
> > time to track them down, but I've attached the output of
> > 
> > # valgrind --leak-check=full fc-cache -sfv > fc-cache-valgrind 2>&1
> > 
> > Note the warnings about write()ing uninitialized buffers to the cache.
> 
> I think I've fixed the memory leaks.  It would really help to give
> valgrind output for a fontconfig with -g and -O0; as it is, I can't be
> absolutely sure that I've fixed them. 

You cut the leaks by more than half but here's a new log (with -g -O0)

-- 
Ronny V. Vindenes <ronnyvv at broadpark.no>
-------------- next part --------------
==29145== Memcheck, a memory error detector.
==29145== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==29145== Using LibVEX rev 1471, a library for dynamic binary translation.
==29145== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==29145== Using valgrind-3.1.0, a dynamic binary instrumentation framework.
==29145== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==29145== For more details, rerun with: -v
==29145== 
bin/fc-cache: "/usr/share/fonts": caching, 0 fonts, 17 dirs
bin/fc-cache: "/usr/share/fonts/bitstream-vera": ==29145== Syscall param write(buf) points to uninitialised byte(s)
==29145==    at 0x3D508BBC60: __write_nocancel (in /lib64/libc-2.3.90.so)
==29145==    by 0x4A1886E: FcDirCacheWrite (fccache.c:1190)
==29145==    by 0x4A21FAD: FcDirSave (fcdir.c:223)
==29145==    by 0x401582: scanDirs (fc-cache.c:210)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145==    by 0x40187C: main (fc-cache.c:309)
==29145==  Address 0x4E54484 is 20 bytes inside a block of size 15,213 alloc'd
==29145==    at 0x4905598: malloc (vg_replace_malloc.c:149)
==29145==    by 0x4A182FA: FcDirCacheProduce (fccache.c:1038)
==29145==    by 0x4A184A6: FcDirCacheWrite (fccache.c:1107)
==29145==    by 0x4A21FAD: FcDirSave (fcdir.c:223)
==29145==    by 0x401582: scanDirs (fc-cache.c:210)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145==    by 0x40187C: main (fc-cache.c:309)
caching, 10 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/ISO8859-2": caching, 0 fonts, 3 dirs
bin/fc-cache: "/usr/share/fonts/ISO8859-2/75dpi": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/ISO8859-2/misc": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/ISO8859-2/100dpi": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/gujarati": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/bitmap-fonts": caching, 32 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/korean": caching, 0 fonts, 2 dirs
bin/fc-cache: "/usr/share/fonts/korean/misc": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/korean/TrueType": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/hebrew": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/dejavu": caching, 20 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/chinese": caching, 0 fonts, 2 dirs
bin/fc-cache: "/usr/share/fonts/chinese/misc": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/chinese/TrueType": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/bengali": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/KOI8-R": caching, 0 fonts, 3 dirs
bin/fc-cache: "/usr/share/fonts/KOI8-R/75dpi": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/KOI8-R/misc": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/KOI8-R/100dpi": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/arabic": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/hindi": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/punjabi": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/japanese": caching, 0 fonts, 2 dirs
bin/fc-cache: "/usr/share/fonts/japanese/misc": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/japanese/TrueType": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/default": caching, 0 fonts, 2 dirs
bin/fc-cache: "/usr/share/fonts/default/Type1": caching, 35 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/default/ghostscript": caching, 17 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/tamil": caching, 0 fonts, 0 dirs
bin/fc-cache: "/usr/share/fonts/mathml": caching, 9 fonts, 0 dirs
bin/fc-cache: "/usr/share/X11/fonts/Type1": ==29145== Warning: invalid file descriptor -1 in syscall close()
caching, 29 fonts, 0 dirs
bin/fc-cache: "/usr/share/X11/fonts/OTF": ==29145== Warning: invalid file descriptor -1 in syscall close()
caching, 14 fonts, 0 dirs
bin/fc-cache: succeeded
==29145== 
==29145== ERROR SUMMARY: 8 errors from 1 contexts (suppressed: 5 from 1)
==29145== malloc/free: in use at exit: 84,738 bytes in 4,962 blocks.
==29145== malloc/free: 383,110 allocs, 378,148 frees, 153,224,269 bytes allocated.
==29145== For counts of detected errors, rerun with: -v
==29145== searching for pointers to 4,962 not-freed blocks.
==29145== checked 166,632 bytes.
==29145== 
==29145== 
==29145== 45 bytes in 1 blocks are possibly lost in loss record 2 of 22
==29145==    at 0x4905598: malloc (vg_replace_malloc.c:149)
==29145==    by 0x4A33503: FcStrPlus (fcstr.c:49)
==29145==    by 0x4A183F4: FcDirCacheWrite (fccache.c:1078)
==29145==    by 0x4A21FAD: FcDirSave (fcdir.c:223)
==29145==    by 0x401582: scanDirs (fc-cache.c:210)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145==    by 0x40187C: main (fc-cache.c:309)
==29145== 
==29145== 
==29145== 91 bytes in 3 blocks are possibly lost in loss record 14 of 22
==29145==    at 0x4905598: malloc (vg_replace_malloc.c:149)
==29145==    by 0x4A33434: FcStrCopy (fcstr.c:37)
==29145==    by 0x4A2DE09: FcValueSave (fcpat.c:123)
==29145==    by 0x4A2FEC5: FcPatternAddWithBinding (fcpat.c:877)
==29145==    by 0x4A30145: FcPatternAdd (fcpat.c:948)
==29145==    by 0x4A304C8: FcPatternAddString (fcpat.c:1041)
==29145==    by 0x4A231D4: FcFreeTypeQuery (fcfreetype.c:1177)
==29145==    by 0x4A21A82: FcFileScanConfig (fcdir.c:70)
==29145==    by 0x4A21E50: FcDirScanConfig (fcdir.c:183)
==29145==    by 0x401497: scanDirs (fc-cache.c:186)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145== 
==29145== 
==29145== 2,922 bytes in 68 blocks are definitely lost in loss record 19 of 22
==29145==    at 0x4905598: malloc (vg_replace_malloc.c:149)
==29145==    by 0x4A33503: FcStrPlus (fcstr.c:49)
==29145==    by 0x4A17E3D: FcDirCacheOpen (fccache.c:884)
==29145==    by 0x4A17608: FcDirCacheValid (fccache.c:608)
==29145==    by 0x401556: scanDirs (fc-cache.c:206)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145==    by 0x40187C: main (fc-cache.c:309)
==29145== 
==29145== 
==29145== 36,028 bytes in 3,359 blocks are definitely lost in loss record 22 of 22
==29145==    at 0x4905598: malloc (vg_replace_malloc.c:149)
==29145==    by 0x4A33434: FcStrCopy (fcstr.c:37)
==29145==    by 0x4A2DE09: FcValueSave (fcpat.c:123)
==29145==    by 0x4A2FEC5: FcPatternAddWithBinding (fcpat.c:877)
==29145==    by 0x4A30145: FcPatternAdd (fcpat.c:948)
==29145==    by 0x4A304C8: FcPatternAddString (fcpat.c:1041)
==29145==    by 0x4A231D4: FcFreeTypeQuery (fcfreetype.c:1177)
==29145==    by 0x4A21A82: FcFileScanConfig (fcdir.c:70)
==29145==    by 0x4A21E50: FcDirScanConfig (fcdir.c:183)
==29145==    by 0x401497: scanDirs (fc-cache.c:186)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145==    by 0x40162F: scanDirs (fc-cache.c:227)
==29145== 
==29145== LEAK SUMMARY:
==29145==    definitely lost: 38,950 bytes in 3,427 blocks.
==29145==      possibly lost: 136 bytes in 4 blocks.
==29145==    still reachable: 45,652 bytes in 1,531 blocks.
==29145==         suppressed: 0 bytes in 0 blocks.
==29145== Reachable blocks (those to which a pointer was found) are not shown.
==29145== To see them, rerun with: --show-reachable=yes


More information about the Fontconfig mailing list