I haven''t experienced any problems in any apps but: $ make check ... *** Test failed: Subdir with a cache file *** output is in ''out'', expected output in ''out.expected'' FAIL: run-test.sh ==================1 of 1 tests failed ================== $ cat out Fixed:pixelsize=16 Fixed:pixelsize=6 Also after installing and running ''fc-cache -fs'' a lot of the files in /var/cache/fontconfig are 131072 bytes (but produce different md5sums) and produce this exact output: $ fc-cat /var/cache/fontconfig/f020b8ea95ccc22321ce43a4499889d8.cache-2 fc-cat: printing directory cache for cache which would be named 1000 78563412 1 8 4 20 10 8 18 4 10 10 4 8 20 8 8 2 20 4 30 1000 Finally running make check-valgrind in cairo cvs, a few memleaks are reported in fontconfig (which is an improvement over earlier fontconfig cvs that triggered illegal memory accesses). -- Ronny V. Vindenes <ronnyvv@broadpark.no>
Ronny V. Vindenes wrote:> I haven''t experienced any problems in any apps but: > > $ make check > ... > *** Test failed: Subdir with a cache file > *** output is in ''out'', expected output in ''out.expected'' > FAIL: run-test.sh > ==================> 1 of 1 tests failed > ==================> > $ cat out > Fixed:pixelsize=16 > Fixed:pixelsize=6 > >Yikes, this is a tricky one. The problem is that the global cache doesn''t contain all of the directory names, so that fc-list misses locally cached subdirectories of globally cached directories. I don''t have a fix yet, but I''m working on one.> Also after installing and running ''fc-cache -fs'' a lot of the files > in /var/cache/fontconfig are 131072 bytes (but produce different > md5sums) and produce this exact output: > > $ fc-cat /var/cache/fontconfig/f020b8ea95ccc22321ce43a4499889d8.cache-2 > fc-cat: printing directory cache for cache which would be named 1000 > 78563412 1 8 4 20 10 8 18 4 10 10 4 8 > 20 8 8 2 20 4 30 1000Hmm. That shouldn''t happen either, almost like you have binaries that are out of synch.> Finally running make check-valgrind in cairo cvs, a few memleaks are > reported in fontconfig (which is an improvement over earlier fontconfig > cvs that triggered illegal memory accesses).Where are they? pat
fre, 20,.01.2006 kl. 01.24 -0500, skrev Patrick Lam:> Ronny V. Vindenes wrote: > > > > Also after installing and running ''fc-cache -fs'' a lot of the files > > in /var/cache/fontconfig are 131072 bytes (but produce different > > md5sums) and produce this exact output: > > > > $ fc-cat /var/cache/fontconfig/f020b8ea95ccc22321ce43a4499889d8.cache-2 > > fc-cat: printing directory cache for cache which would be named 1000 > > 78563412 1 8 4 20 10 8 18 4 10 10 4 8 > > 20 8 8 2 20 4 30 1000 > > Hmm. That shouldn''t happen either, almost like you have binaries that > are out of synch.Binaries are definitely in sync: $ ll -gG /usr/bin/fc-* /usr/lib64/libfontconfig.so.1.0.4 -rwxr-xr-x 1 14176 jan 19 21:56 /usr/bin/fc-cache -rwxr-xr-x 1 32176 jan 19 21:56 /usr/bin/fc-cat -rwxr-xr-x 1 11096 jan 19 21:56 /usr/bin/fc-list -rwxr-xr-x 1 11336 jan 19 21:56 /usr/bin/fc-match -rwxr-xr-x 1 260840 jan 19 21:56 /usr/lib64/libfontconfig.so.1.0.4 Today I also got the same output from fc-cat on my ~/.fonts.cache-2 and it is much larger than the system cache files.> > > Finally running make check-valgrind in cairo cvs, a few memleaks are > > reported in fontconfig (which is an improvement over earlier fontconfig > > cvs that triggered illegal memory accesses). > > Where are they?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. -- Ronny V. Vindenes <ronnyvv@broadpark.no> -------------- next part -------------- ==8189== Memcheck, a memory error detector. ==8189== Copyright (C) 2002-2005, and GNU GPL''d, by Julian Seward et al. ==8189== Using LibVEX rev 1471, a library for dynamic binary translation. ==8189== Copyright (C) 2004-2005, and GNU GPL''d, by OpenWorks LLP. ==8189== Using valgrind-3.1.0, a dynamic binary instrumentation framework. ==8189== Copyright (C) 2000-2005, and GNU GPL''d, by Julian Seward et al. ==8189== For more details, rerun with: -v ==8189== fc-cache: "/usr/share/fonts": caching, 0 fonts, 17 dirs fc-cache: "/usr/share/fonts/bitstream-vera": ==8189== Warning: invalid file descriptor -1 in syscall close() ==8189== Syscall param write(buf) points to uninitialised byte(s) ==8189== at 0x3D508BBC60: __write_nocancel (in /lib64/libc-2.3.90.so) ==8189== by 0x3748B0FACE: FcDirCacheWrite (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x401365: ??? (fc-cache.c:210) ==8189== by 0x4013AA: ??? (fc-cache.c:227) ==8189== by 0x4017F6: ??? (fc-cache.c:309) ==8189== by 0x3D5081CDE3: __libc_start_main (in /lib64/libc-2.3.90.so) ==8189== Address 0x4D2CCE4 is 340 bytes inside a block of size 15,213 alloc''d ==8189== at 0x4905598: malloc (vg_replace_malloc.c:149) ==8189== by 0x3748B0F13E: (within /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B0F6E6: FcDirCacheWrite (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x401365: ??? (fc-cache.c:210) ==8189== by 0x4013AA: ??? (fc-cache.c:227) ==8189== by 0x4017F6: ??? (fc-cache.c:309) ==8189== by 0x3D5081CDE3: __libc_start_main (in /lib64/libc-2.3.90.so) caching, 10 fonts, 0 dirs fc-cache: "/usr/share/fonts/ISO8859-2": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 3 dirs fc-cache: "/usr/share/fonts/ISO8859-2/75dpi": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/ISO8859-2/misc": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/ISO8859-2/100dpi": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/gujarati": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/bitmap-fonts": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 32 fonts, 0 dirs fc-cache: "/usr/share/fonts/korean": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 2 dirs fc-cache: "/usr/share/fonts/korean/misc": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/korean/TrueType": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/hebrew": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/dejavu": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 20 fonts, 0 dirs fc-cache: "/usr/share/fonts/chinese": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 2 dirs fc-cache: "/usr/share/fonts/chinese/misc": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/chinese/TrueType": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/bengali": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/KOI8-R": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 3 dirs fc-cache: "/usr/share/fonts/KOI8-R/75dpi": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/KOI8-R/misc": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/KOI8-R/100dpi": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/arabic": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/hindi": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/punjabi": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/japanese": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 2 dirs fc-cache: "/usr/share/fonts/japanese/misc": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/japanese/TrueType": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/default": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 2 dirs fc-cache: "/usr/share/fonts/default/Type1": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 35 fonts, 0 dirs fc-cache: "/usr/share/fonts/default/ghostscript": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 8 fonts, 0 dirs fc-cache: "/usr/share/fonts/tamil": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 0 fonts, 0 dirs fc-cache: "/usr/share/fonts/mathml": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 9 fonts, 0 dirs fc-cache: "/usr/share/X11/fonts/Type1": ==8189== Warning: invalid file descriptor -1 in syscall close() ==8189== ==8189== Syscall param write(buf) points to uninitialised byte(s) ==8189== at 0x3D508BBC60: __write_nocancel (in /lib64/libc-2.3.90.so) ==8189== by 0x3748B0FACE: FcDirCacheWrite (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x401365: ??? (fc-cache.c:210) ==8189== by 0x4017F6: ??? (fc-cache.c:309) ==8189== by 0x3D5081CDE3: __libc_start_main (in /lib64/libc-2.3.90.so) ==8189== Address 0x551927C is 948 bytes inside a block of size 38,268 alloc''d ==8189== at 0x4905598: malloc (vg_replace_malloc.c:149) ==8189== by 0x3748B0F13E: (within /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B0F6E6: FcDirCacheWrite (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x401365: ??? (fc-cache.c:210) ==8189== by 0x4017F6: ??? (fc-cache.c:309) ==8189== by 0x3D5081CDE3: __libc_start_main (in /lib64/libc-2.3.90.so) caching, 29 fonts, 0 dirs fc-cache: "/usr/share/X11/fonts/OTF": ==8189== Warning: invalid file descriptor -1 in syscall close() caching, 14 fonts, 0 dirs fc-cache: succeeded ==8189== ==8189== ERROR SUMMARY: 8 errors from 2 contexts (suppressed: 4 from 1) ==8189== malloc/free: in use at exit: 127,988 bytes in 5,825 blocks. ==8189== malloc/free: 381,943 allocs, 376,118 frees, 151,565,762 bytes allocated. ==8189== For counts of detected errors, rerun with: -v ==8189== searching for pointers to 5,825 not-freed blocks. ==8189== checked 166,776 bytes. ==8189== ==8189== ==8189== 220 bytes in 6 blocks are possibly lost in loss record 14 of 22 ==8189== at 0x4905598: malloc (vg_replace_malloc.c:149) ==8189== by 0x3748B27C77: FcStrCopy (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B21654: FcValueSave (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B23C02: FcPatternAddWithBinding (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B18A60: FcFreeTypeQuery (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B1712D: FcFileScanConfig (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B173D3: FcDirScanConfig (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x40132A: ??? (fc-cache.c:186) ==8189== by 0x4013AA: ??? (fc-cache.c:227) ==8189== by 0x4013AA: ??? (fc-cache.c:227) ==8189== by 0x4017F6: ??? (fc-cache.c:309) ==8189== by 0x3D5081CDE3: __libc_start_main (in /lib64/libc-2.3.90.so) ==8189== ==8189== ==8189== 4,046 bytes in 34 blocks are definitely lost in loss record 18 of 22 ==8189== at 0x4905598: malloc (vg_replace_malloc.c:149) ==8189== by 0x3748B0F963: FcDirCacheWrite (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x401365: ??? (fc-cache.c:210) ==8189== by 0x4013AA: ??? (fc-cache.c:227) ==8189== by 0x4017F6: ??? (fc-cache.c:309) ==8189== by 0x3D5081CDE3: __libc_start_main (in /lib64/libc-2.3.90.so) ==8189== ==8189== ==8189== 6,781 bytes in 130 blocks are definitely lost in loss record 19 of 22 ==8189== at 0x4905598: malloc (vg_replace_malloc.c:149) ==8189== by 0x3748B27EDB: FcStrPlus (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B0EFA9: (within /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B10852: FcDirCacheUnlink (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x4014FE: ??? (fc-cache.c:207) ==8189== by 0x4013AA: ??? (fc-cache.c:227) ==8189== by 0x4017F6: ??? (fc-cache.c:309) ==8189== by 0x3D5081CDE3: __libc_start_main (in /lib64/libc-2.3.90.so) ==8189== ==8189== ==8189== 71,103 bytes in 4,125 blocks are definitely lost in loss record 22 of 22 ==8189== at 0x4905598: malloc (vg_replace_malloc.c:149) ==8189== by 0x3748B27C77: FcStrCopy (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B21654: FcValueSave (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B23C02: FcPatternAddWithBinding (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B18F2D: FcFreeTypeQuery (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B1712D: FcFileScanConfig (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x3748B173D3: FcDirScanConfig (in /usr/lib64/libfontconfig.so.1.0.4) ==8189== by 0x40132A: ??? (fc-cache.c:186) ==8189== by 0x4013AA: ??? (fc-cache.c:227) ==8189== by 0x4017F6: ??? (fc-cache.c:309) ==8189== by 0x3D5081CDE3: __libc_start_main (in /lib64/libc-2.3.90.so) ==8189== ==8189== LEAK SUMMARY: ==8189== definitely lost: 81,930 bytes in 4,289 blocks. ==8189== possibly lost: 220 bytes in 6 blocks. ==8189== still reachable: 45,838 bytes in 1,530 blocks. ==8189== suppressed: 0 bytes in 0 blocks. ==8189== Reachable blocks (those to which a pointer was found) are not shown. ==8189== To see them, rerun with: --show-reachable=yes
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. The uninitialized buffers are harmless; what happens is the following: malloc() allocates, say, 200 bytes. write 50 bytes to the buffer skip 20 bytes (e.g. for alignment reasons) write 70 bytes to the buffer so valgrind sees the 20 skipped bytes and complains. It would be nice if valgrind didn''t complain, but I don''t have a straightforward solution. Clearing the buffer ahead of time doesn''t actually help, because it gets copied from somewhere else. I''d have to find the source of the copy to fix the problem. pat
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@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
Ronny V. Vindenes wrote:> 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)Thanks, they should be gone now. Let me know. Now onto more substantive issues which affect functionality... pat
Ronny V. Vindenes wrote:> I haven''t experienced any problems in any apps but: > > $ make check > ... > *** Test failed: Subdir with a cache file > *** output is in ''out'', expected output in ''out.expected'' > FAIL: run-test.sh > ==================> 1 of 1 tests failed > ==================[...]> Also after installing and running ''fc-cache -fs'' a lot of the files > in /var/cache/fontconfig are 131072 bytes (but produce different > md5sums) and produce this exact output:I think that both of these issues are fixed now. In particular I just committed a fix for the first issue. pat
Ronny V. Vindenes wrote:> I haven''t experienced any problems in any apps but: > > $ make check > ... > *** Test failed: Subdir with a cache file > *** output is in ''out'', expected output in ''out.expected'' > FAIL: run-test.sh > ==================> 1 of 1 tests failed > ==================So make check works for me now, but make distcheck now fails on my laptop (Debian unstable) for 2.3.2 and cvs: it says that a bunch of files are left over. ERROR: files left after distclean: ./fc-cache/fc-cache.sgml ./fc-cat/fc-cat.sgml ./fc-list/fc-list.sgml ./doc/func.sgml Anyone know why this is happening? pat
On Mon, 30 Jan 2006, Patrick Lam wrote:> ERROR: files left after distclean: > ./fc-cache/fc-cache.sgml > ./fc-cat/fc-cat.sgml > ./fc-list/fc-list.sgml > ./doc/func.sgml > > Anyone know why this is happening? > > patSeems like to me that changing the Makefile.am''s like this will fix it: For doc/Makefile.am: - FNCS_TMPL = ${DOC_SRC}/func.sgml + FNCS_TMPL = func.sgml --behdad http://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill" -- Dan Bern, "New American Language"
Behdad Esfahbod wrote:> On Mon, 30 Jan 2006, Patrick Lam wrote: > > >>ERROR: files left after distclean: >>./fc-cache/fc-cache.sgml >>./fc-cat/fc-cat.sgml >>./fc-list/fc-list.sgml >>./doc/func.sgml >> >>Anyone know why this is happening? >> >>pat > > > Seems like to me that changing the Makefile.am''s like this will > fix it: > > For doc/Makefile.am: > > - FNCS_TMPL = ${DOC_SRC}/func.sgml > + FNCS_TMPL = func.sgmlThat doesn''t quite work... ./edit-sgml func.sgml < ''../../doc/fcatomic.fncs'' > fcatomic.sgml fatal: can''t open file func.sgml make[3]: *** [fcatomic.sgml] Error 1 pat
On Tue, 31 Jan 2006, Patrick Lam wrote:> > Seems like to me that changing the Makefile.am''s like this will > > fix it: > > > > For doc/Makefile.am: > > > > - FNCS_TMPL = ${DOC_SRC}/func.sgml > > + FNCS_TMPL = func.sgml > > That doesn''t quite work...Ok, then just make sure "func.sgml" is listed in EXTRA_DIST instead of $(FNCS_TMPL).> ./edit-sgml func.sgml < ''../../doc/fcatomic.fncs'' > fcatomic.sgml > fatal: can''t open file func.sgml > make[3]: *** [fcatomic.sgml] Error 1 > > pat > >--behdad http://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill" -- Dan Bern, "New American Language"
Behdad Esfahbod wrote:> On Tue, 31 Jan 2006, Patrick Lam wrote: > > >>>Seems like to me that changing the Makefile.am''s like this will >>>fix it: >>> >>>For doc/Makefile.am: >>> >>>- FNCS_TMPL = ${DOC_SRC}/func.sgml >>>+ FNCS_TMPL = func.sgml >> >>That doesn''t quite work... > > > Ok, then just make sure "func.sgml" is listed in EXTRA_DIST > instead of $(FNCS_TMPL).That''s not quite right either: ./edit-sgml < ''fcatomic.fncs'' > fcatomic.sgml fatal: usage: ./edit-sgml <template.sgml> using this diff (I also tried with EXTRA_DIST=${DOC_SRC}/func.sgml). Index: doc/Makefile.am ==================================================================RCS file: /cvs/fontconfig/fontconfig/doc/Makefile.am,v retrieving revision 1.22 diff -u -p -r1.22 Makefile.am --- doc/Makefile.am 3 Mar 2005 01:59:28 -0000 1.22 +++ doc/Makefile.am 31 Jan 2006 16:08:09 -0000 @@ -37,7 +37,7 @@ PDF = fontconfig-user.pdf fontconfig-dev HTML_FILES = fontconfig-user.html HTML_DIR = fontconfig-devel SGML = fontconfig-user.sgml fontconfig-devel.sgml -FNCS_TMPL = ${DOC_SRC}/func.sgml +FNCS_TMPL DOC_FUNCS_FNCS=\ fcatomic.fncs \ @@ -86,7 +86,7 @@ docdir=@DOCDIR@ DOC_FILES=$(TXT) $(PDF) $(HTML_FILES) LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/* -EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in+EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) func.sgml confdir.sgml.in SUFFIXES=.fncs .sgml .txt .html
Attaching a patch that makes it work here. That''s what I meant. behdad On Tue, 31 Jan 2006, Patrick Lam wrote:> Behdad Esfahbod wrote: > > On Tue, 31 Jan 2006, Patrick Lam wrote: > > > > > >>>Seems like to me that changing the Makefile.am''s like this will > >>>fix it: > >>> > >>>For doc/Makefile.am: > >>> > >>>- FNCS_TMPL = ${DOC_SRC}/func.sgml > >>>+ FNCS_TMPL = func.sgml > >> > >>That doesn''t quite work... > > > > > > Ok, then just make sure "func.sgml" is listed in EXTRA_DIST > > instead of $(FNCS_TMPL). > > That''s not quite right either: > > ./edit-sgml < ''fcatomic.fncs'' > fcatomic.sgml > fatal: usage: ./edit-sgml <template.sgml> > > using this diff (I also tried with EXTRA_DIST=${DOC_SRC}/func.sgml). > > Index: doc/Makefile.am > ==================================================================> RCS file: /cvs/fontconfig/fontconfig/doc/Makefile.am,v > retrieving revision 1.22 > diff -u -p -r1.22 Makefile.am > --- doc/Makefile.am 3 Mar 2005 01:59:28 -0000 1.22 > +++ doc/Makefile.am 31 Jan 2006 16:08:09 -0000 > @@ -37,7 +37,7 @@ PDF = fontconfig-user.pdf fontconfig-dev > HTML_FILES = fontconfig-user.html > HTML_DIR = fontconfig-devel > SGML = fontconfig-user.sgml fontconfig-devel.sgml > -FNCS_TMPL = ${DOC_SRC}/func.sgml > +FNCS_TMPL > > DOC_FUNCS_FNCS=\ > fcatomic.fncs \ > @@ -86,7 +86,7 @@ docdir=@DOCDIR@ > DOC_FILES=$(TXT) $(PDF) $(HTML_FILES) > LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/* > > -EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) > confdir.sgml.in+EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) > func.sgml confdir.sgml.in > > SUFFIXES=.fncs .sgml .txt .html > > >--behdad http://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill" -- Dan Bern, "New American Language" -------------- next part -------------- Index: doc/Makefile.am ==================================================================RCS file: /cvs/fontconfig/fontconfig/doc/Makefile.am,v retrieving revision 1.22 diff -u -p -r1.22 Makefile.am --- doc/Makefile.am 3 Mar 2005 01:59:28 -0000 1.22 +++ doc/Makefile.am 31 Jan 2006 23:37:12 -0000 @@ -86,7 +86,7 @@ docdir=@DOCDIR@ DOC_FILES=$(TXT) $(PDF) $(HTML_FILES) LOCAL_DOCS=$(man3_MANS) $(man5_MANS) $(DOC_FILES) $(HTML_DIR)/* -EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in +EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) func.sgml confdir.sgml.in SUFFIXES=.fncs .sgml .txt .html Index: fc-cache/Makefile.am ==================================================================RCS file: /cvs/fontconfig/fontconfig/fc-cache/Makefile.am,v retrieving revision 1.10.4.4 diff -u -p -r1.10.4.4 Makefile.am --- fc-cache/Makefile.am 31 Jan 2006 07:30:23 -0000 1.10.4.4 +++ fc-cache/Makefile.am 31 Jan 2006 23:37:12 -0000 @@ -39,7 +39,7 @@ INCLUDES=-I${top_srcdir} $(FREETYPE_CFLA bin_PROGRAMS=fc-cache -EXTRA_DIST=$(SGML) +EXTRA_DIST=fc-cache.sgml fc_cache_LDADD = ${top_builddir}/src/libfontconfig.la Index: fc-cat/Makefile.am ==================================================================RCS file: /cvs/fontconfig/fontconfig/fc-cat/Attic/Makefile.am,v retrieving revision 1.1.2.2 diff -u -p -r1.1.2.2 Makefile.am --- fc-cat/Makefile.am 9 Dec 2005 16:36:45 -0000 1.1.2.2 +++ fc-cat/Makefile.am 31 Jan 2006 23:37:12 -0000 @@ -33,7 +33,7 @@ INCLUDES=-I${top_srcdir} $(FREETYPE_CFLA bin_PROGRAMS=fc-cat -EXTRA_DIST=$(SGML) +EXTRA_DIST=fc-cat.sgml fc_cat_LDADD = ${top_builddir}/src/libfontconfig.la Index: fc-list/Makefile.am ==================================================================RCS file: /cvs/fontconfig/fontconfig/fc-list/Makefile.am,v retrieving revision 1.10 diff -u -p -r1.10 Makefile.am --- fc-list/Makefile.am 7 Dec 2004 01:14:46 -0000 1.10 +++ fc-list/Makefile.am 31 Jan 2006 23:37:12 -0000 @@ -31,7 +31,7 @@ bin_PROGRAMS=fc-list INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) $(WARN_CFLAGS) -EXTRA_DIST=$(SGML) +EXTRA_DIST=fc-list.sgml fc_list_LDADD = ${top_builddir}/src/libfontconfig.la
Behdad Esfahbod wrote:> Attaching a patch that makes it work here. That''s what I meant.Yes, it works for me too. The problem is with automake 1.6.3, which I don''t think is too common, but anyway the patch doesn''t seem to do any harm with 1.9, so I committed it. pat