fontconfig/src
Behdad Esfahbod dc21ed28d6 Fix memory corruption!
In FcStrListCreate() we were increasing reference count of set,
however, if set had a const reference (which is the case for list
of languages), and with multiple threads, the const ref (-1) was
getting up to 1 and then a decrease was destroying the set.  Ouch.

Here's the valgrind error, which took me quite a few hours of
running to catch:

==4464== Invalid read of size 4
==4464==    at 0x4E58FF3: FcStrListNext (fcstr.c:1256)
==4464==    by 0x4E3F11D: FcConfigSubstituteWithPat (fccfg.c:1508)
==4464==    by 0x4E3F8F4: FcConfigSubstitute (fccfg.c:1729)
==4464==    by 0x4009FA: test_match (simple-pthread-test.c:53)
==4464==    by 0x400A6E: run_test_in_thread (simple-pthread-test.c:68)
==4464==    by 0x507EE99: start_thread (pthread_create.c:308)
==4464==  Address 0x6bc0b44 is 4 bytes inside a block of size 24 free'd
==4464==    at 0x4C2A82E: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4464==    by 0x4E58F84: FcStrSetDestroy (fcstr.c:1236)
==4464==    by 0x4E3F0C6: FcConfigSubstituteWithPat (fccfg.c:1507)
==4464==    by 0x4E3F8F4: FcConfigSubstitute (fccfg.c:1729)
==4464==    by 0x4009FA: test_match (simple-pthread-test.c:53)
==4464==    by 0x400A6E: run_test_in_thread (simple-pthread-test.c:68)
==4464==    by 0x507EE99: start_thread (pthread_create.c:308)

Thread test is running happily now.  Will add the test in a moment.
2013-01-08 13:03:35 -06:00
..
Makefile.am Bug 47705 - Using O_CLOEXEC 2013-01-08 15:34:09 +09:00
fcarch.c Enable fcarch assert checks even when FC_ARCHITECTURE is explicitly given 2012-12-31 17:20:29 -06:00
fcarch.h Move workaround macros for fat binaries into the separate header file 2012-03-29 12:50:47 +09:00
fcatomic.c Bug 47705 - Using O_CLOEXEC 2013-01-08 15:34:09 +09:00
fcatomic.h Fix build around true/false 2013-01-02 18:57:47 -06:00
fcblanks.c Remove memory accounting and reporting 2012-12-29 23:12:07 -05:00
fccache.c missing header file to declare _mkdir 2013-01-08 16:18:32 +09:00
fccfg.c Fix build and warnings on win32 2013-01-02 17:35:56 -06:00
fccharset.c Make refcounts, patterns, charsets, strings, and FcLang thread-safe 2013-01-02 00:51:00 -06:00
fccompat.c Fix a build fail on mingw 2013-01-08 16:20:40 +09:00
fcdbg.c Make FcInitDebug() idempotent 2013-01-02 00:53:16 -06:00
fcdefault.c Remove FcSharedStr* 2013-01-02 02:18:02 -06:00
fcdeprecate.h Export FcConfig{G,S}etRescanInverval from .so, mark as deprecated. 2007-11-04 12:20:45 -08:00
fcdir.c Fix unused-parameter warnings 2012-12-29 22:32:56 -05:00
fcformat.c Don't crash in FcPatternFormat() with NULL pattern 2013-01-01 20:20:31 -06:00
fcfreetype.c Fix sign-compare warnings 2012-12-29 22:47:49 -05:00
fcfs.c Remove memory accounting and reporting 2012-12-29 23:12:07 -05:00
fcftint.h Remove all training whitespaces 2010-04-12 12:19:05 -04:00
fcinit.c Fix build around true/false 2013-01-02 18:57:47 -06:00
fcint.h Bug 47705 - Using O_CLOEXEC 2013-01-08 15:34:09 +09:00
fclang.c Make refcounts, patterns, charsets, strings, and FcLang thread-safe 2013-01-02 00:51:00 -06:00
fclist.c Remove FcSharedStr* 2013-01-02 02:18:02 -06:00
fcmatch.c Make refcounts, patterns, charsets, strings, and FcLang thread-safe 2013-01-02 00:51:00 -06:00
fcmatrix.c Remove memory accounting and reporting 2012-12-29 23:12:07 -05:00
fcmutex.h Fix build and warnings on win32 2013-01-02 17:35:56 -06:00
fcname.c Remove FcSharedStr* 2013-01-02 02:18:02 -06:00
fcobjs.c Minor 2013-01-03 04:19:12 -06:00
fcobjs.h Use a static perfect hash table for object-name lookup 2013-01-02 00:35:39 -06:00
fcobjshash.gperf.h Fix more warnings. 2013-01-02 18:00:09 -06:00
fcpat.c Remove FcSharedStr* 2013-01-02 02:18:02 -06:00
fcserialize.c Fix more warnings 2012-12-29 22:56:14 -05:00
fcstat.c Bug 47705 - Using O_CLOEXEC 2013-01-08 15:34:09 +09:00
fcstr.c Fix memory corruption! 2013-01-08 13:03:35 -06:00
fcwindows.h Fix build and warnings on win32 2013-01-02 17:35:56 -06:00
fcxml.c Bug 47705 - Using O_CLOEXEC 2013-01-08 15:34:09 +09:00
ftglue.c Fix more warnings 2012-12-29 22:56:14 -05:00
ftglue.h Remove unused ftglue code 2009-06-28 14:14:46 -04:00
makealias Bug 48020 - Fix for src/makealias on Solaris 10 2012-03-29 15:43:38 +09:00