[Fontconfig] fontconfig: Branch 'master'

Raimund Steger rs at mytum.de
Tue Feb 24 14:17:37 PST 2015


Hi,

I just tried it with a font directory on a FAT USB drive, but it dumps 
core here. Some dbx output below.

On 02/23/15 07:23, Akira TAGOH wrote:
> [...]
> +    while ((dent = readdir (d)))
> +    {
> +	if ((filter) (dent))

I believe filter can be NULL because of:

>   #ifdef HAVE_STRUCT_DIRENT_D_TYPE
>   		 &FcDirChecksumScandirFilter,

(This #ifdef does make sense per se, I think POSIX guarantees only d_ino 
and d_name.)


sun2:fontconfig)fc-cache -v
zsh: segmentation fault (core dumped)  fc-cache -v
sun2:fontconfig)dbx `which fc-cache` core
[...]
t at 1 (l at 1) program terminated by signal SEGV (no mapping at the fault 
address)
0xffffffffffffffff:     <bad address 0xffffffffffffffff>
Current function is FcScandir
   216           if ((filter) (dent))
(dbx) where
current thread: t at 1
   [1] 0x0(0xfe234000, 0x0), at 0x0
=>[2] FcScandir(dirp = 0x8063d58 "/media/WININSTALL/fonts", namelist = 
0xfeffe0e0, filter = (nil), compar = 0xfe756ba0 = 
&`libfontconfig.so.1.8.0`fcstat.c`FcDirChecksumScandirSorter(const 
struct dirent **lhs, const struct dirent **rhs)), line 216 in "fcstat.c"
   [3] FcDirChecksum(dir = 0x8063d58 "/media/WININSTALL/fonts", checksum 
= 0xfeffe194), line 264 in "fcstat.c"
   [4] FcStatChecksum(file = 0x8063d58 "/media/WININSTALL/fonts", statb 
= 0xfeffe150), line 325 in "fcstat.c"
   [5] FcDirCacheProcess(config = 0x8062f90, dir = 0x8063c78 
"/media/WININSTALL/fonts", callback = 0xfe72fcd0 = 
&`libfontconfig.so.1.8.0`fccache.c`FcDirCacheMapHelper(FcConfig *config, 
int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure), 
closure = 0xfeffe2f0, cache_file_ret = (nil)), line 196 in "fccache.c"
   [6] FcDirCacheLoad(dir = 0x8063c78 "/media/WININSTALL/fonts", config 
= 0x8062f90, cache_file = (nil)), line 717 in "fccache.c"
   [7] FcDirCacheRead(dir = 0x8063c78 "/media/WININSTALL/fonts", force = 
0, config = 0x8062f90), line 443 in "fcdir.c"
   [8] FcConfigAddDirList(config = 0x8062f90, set = FcSetSystem, dirSet 
= 0x8063020), line 380 in "fccfg.c"
   [9] FcConfigBuildFonts(config = 0x8062f90), line 414 in "fccfg.c"
   [10] FcConfigSetCurrent(config = 0x8062f90), line 433 in "fccfg.c"
   [11] main(argc = 2, argv = 0xfeffe480), line 365 in "fc-cache.c"
(dbx) list 

   216           if ((filter) (dent))
   217           {
   218               p = (struct dirent *) malloc (sizeof (struct dirent));
   219               memcpy (p, dent, sizeof (struct dirent));
   220               if (n >= lsize)
   221               {
   222                   lsize += 128;
   223                   dlp = (struct dirent **) realloc (dlist, sizeof 
(struct dirent *) * lsize);
   224                   if (!dlp)
   225                   {
(dbx) print filter
filter = (nil)


-- 
Worringer Str 31 Duesseldorf 40211 DE  home: <rs at mytum.de>
+49-179-2981632 icq 16845346           work: <rs at interface-ag.de>


More information about the Fontconfig mailing list