[Fontconfig] fontconfig: Branch 'master' - 23 commits

Raimund Steger rs at mytum.de
Mon Jan 7 18:40:09 PST 2013


Behdad Esfahbod wrote:
> Oh, my bad.  That was against an old fontconfig.  With new one I see malloc
> failures, perhaps because of a memory corruption...  Investigating.

Yes, that sounds more like it.

On Solaris, it depends on what malloc library I use. With the default 
malloc (non-scalable but threadsafe allocator), the crashes are often 
inside malloc. With libmtmalloc (multi-threaded allocator), they are 
often in FcStrListNext, called from FcConfigSubstituteWithPat, like:

sun2:fontconfig)dbx simple-pthread-test core
[...]
t at 2 (l at 2) terminated by signal SEGV (no mapping at the fault address)
Current function is FcStrListNext
  1258       return list->set->strs[list->n++];
(dbx) where 

current thread: t at 2
=>[1] FcStrListNext(list = 0x8161960), line 1258 in "fcstr.c"
   [2] FcConfigSubstituteWithPat(config = 0x8065088, p = 0x8161948, 
p_pat = (nil), kind = FcMatchPattern), line 1508 in "fccfg.c"
   [3] FcConfigSubstitute(config = (nil), p = 0x8161948, kind = 
FcMatchPattern), line 1729 in "fccfg.c"
   [4] test_match(thr_num = 1, test_num = 40), line 53 in 
"simple-pthread-test.c"
   [5] run_test_in_thread(arg = 0x8046e0c), line 68 in 
"simple-pthread-test.c"
   [6] _thr_setup(0xfe720200), at 0xfee4875b
   [7] _lwp_start(0x0, 0x8161964, 0x8161960, 0xfe82ef6c, 0xfeeefc1f, 
0x8161960), at 0xfee48a60


This is also what I have now seen on another box (FreeBSD 8.3, 8 core 
Opteron, 32 bit ABI, clang 3.0 -- which supports the GCC builtins -- 
with unmodified Git master):

bsd1:fontconfig)gdb simple-pthread-test simple-pthread-test.core
[...]
#0  0x280afc1c in IA__FcStrListNext (list=Variable "list" is not available.
) at fcstr.c:1258
[...]
(gdb) where
#0  0x280afc1c in IA__FcStrListNext (list=Variable "list" is not available.
) at fcstr.c:1258
#1  0x28096a41 in IA__FcConfigSubstituteWithPat (config=Unhandled dwarf 
expression opcode 0x0
) at fccfg.c:1508
#2  0x28097534 in IA__FcConfigSubstitute (config=0x7e0e5f30, p=0x7e0e5f30,
     kind=2114871088) at fccfg.c:1729
#3  0x08048886 in test_match (thr_num=39, test_num=243)
     at simple-pthread-test.c:53
#4  0x080488ff in run_test_in_thread (arg=0x7fbfe8e4) at 
simple-pthread-test.c:68
#5  0x280cb76f in pthread_getprio () from /lib/libthr.so.3
#6  0x00000000 in ?? ()



-Raimund





-- 
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