[Fontconfig] Re: Committed mmap patch to branch

Patrick Lam plam at MIT.EDU
Thu Sep 1 01:12:59 EST 2005


This patch should help.  Please try now!

2005-08-31      Patrick Lam     <plam at mit.edu>

        * fc-cache/fc-cache.c:
        * src/fccache.c (FcGlobalCacheDirDestroy, FcGlobalCacheSave,
                                FcCacheSkipToArch):
        * src/fcfs.c (FcFontSetSerialize):

        Only load requested fonts for fc-cache, and cleanup memory
        handling: *Serialize no longer mutates original FcPatterns,
        it creates a new copy in the supplied buffer.  Fix thinkos
        in global cache freeing and in FcCacheSkipToArch.


James Cloos wrote:
> I gave this a test (w/o actually installing it yet).  
> 
> Running the uninstalled fc-cache (via the libtool script, of course)
> resulted in a segv:
> 
> (gdb) where
> #0  0xb7d7f968 in strcmp () from /lib/tls/libc.so.6
> #1  0xb7f271ae in FcCacheSkipToArch () from /home/cloos/Projects/FC/TAGS/fc-2_4_branch/src/.libs/libfontconfig.so.1
> #2  0xb7f27721 in FcGlobalCacheSave () from /home/cloos/Projects/FC/TAGS/fc-2_4_branch/src/.libs/libfontconfig.so.1
> #3  0xb7f2b294 in FcConfigBuildFonts () from /home/cloos/Projects/FC/TAGS/fc-2_4_branch/src/.libs/libfontconfig.so.1
> #4  0xb7f3227c in FcInitLoadConfigAndFonts () from /home/cloos/Projects/FC/TAGS/fc-2_4_branch/src/.libs/libfontconfig.so.1
> #5  0xb7f324ec in FcInit () from /home/cloos/Projects/FC/TAGS/fc-2_4_branch/src/.libs/libfontconfig.so.1
> #6  0x0804923a in main ()
> 
> It also seemed to ignore the directory I supplied on the command line
> and scanned through all of the <dir/>s in my fonts.conf, mmap(2)ing
> each font.  (I only followed along via strace(1); I didn't step thru
> in gdb(1).)
> 
> I used the -v option, and the segv occurred before anything was output.
> 
> The dump above was w/ -v but w/o other args.
> 
> -JimC




More information about the Fontconfig mailing list