1. 10 Jan, 2013 5 commits
  2. 09 Jan, 2013 2 commits
  3. 08 Jan, 2013 6 commits
    • Behdad Esfahbod's avatar
      Add pthread test · 7680e9ee
      Behdad Esfahbod authored
      Not enabled by default since it requires config and fonts.
      7680e9ee
    • Behdad Esfahbod's avatar
      Fix memory corruption! · dc21ed28
      Behdad Esfahbod authored
      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.
      dc21ed28
    • Akira TAGOH's avatar
      Fix a build fail on mingw · 4e6c7d08
      Akira TAGOH authored
      Regarding the change of 596931c8
      4e6c7d08
    • Akira TAGOH's avatar
      missing header file to declare _mkdir · d837a7a5
      Akira TAGOH authored
      d837a7a5
    • Akira TAGOH's avatar
      Bug 47705 - Using O_CLOEXEC · 596931c8
      Akira TAGOH authored
      596931c8
    • Behdad Esfahbod's avatar
      Fix pthreads setup · d7de1b5c
      Behdad Esfahbod authored
      As reported by Raimund Steger.
      d7de1b5c
  4. 07 Jan, 2013 3 commits
  5. 04 Jan, 2013 3 commits
  6. 03 Jan, 2013 8 commits
    • Behdad Esfahbod's avatar
      Minor · 8e143b4e
      Behdad Esfahbod authored
      8e143b4e
    • Behdad Esfahbod's avatar
      Ugh, add Tools.mk · 16ddb9ff
      Behdad Esfahbod authored
      16ddb9ff
    • Behdad Esfahbod's avatar
      Second try to make Sun CPP happy · 86e32551
      Behdad Esfahbod authored
      86e32551
    • Behdad Esfahbod's avatar
    • Behdad Esfahbod's avatar
      Work around Sun CPP · 32c1d32c
      Behdad Esfahbod authored
      According to Raimund Steger:
      
      > [...]
      > diff --git a/src/Makefile.am b/src/Makefile.am
      > index dc082b7..57c34a2 100644
      > [...]
      > +fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
      > +    $(AM_V_GEN) $(CPP) -I$(top_srcdir) $< | $(GREP) '^[^#]' | awk ' \
      > +    /CUT_OUT_BEGIN/ { no_write=1; next; }; \
      > +    /CUT_OUT_END/ { no_write=0; next; }; \
      > +    { if (!no_write) print; next; }; \
      > +    ' - > $@.tmp && \
      > +    mv -f $@.tmp $@
      
      Sun Studio CPP seems to insert whitespace in a different way than GCC's CPP.
      
      GCC generates in src/fcobjshash.gperf:
      
      [...]
      "family", FC_FAMILY_OBJECT
      "familylang", FC_FAMILYLANG_OBJECT
      [...]
      
      Sun Studio generates:
      
      [...]
       "family" , FC_FAMILY_OBJECT
       "familylang" , FC_FAMILYLANG_OBJECT
      [...]
      
      leading to:
      
      [...]
      Making all in src
      gmake[2]: Entering directory `/home/rs/src/fontconfig-git/fontconfig/src'
        GEN    fcobjshash.gperf
        GEN    fcobjshash.h
      Key link: " " = " ", with key set "".
      1 input keys have identical hash values,
      use option -D.
      gmake[2]: *** [fcobjshash.h] Error 1
      gmake[2]: Leaving directory `/home/rs/src/fontconfig-git/fontconfig/src'
      gmake[1]: *** [all-recursive] Error 1
      gmake[1]: Leaving directory `/home/rs/src/fontconfig-git/fontconfig'
      gmake: *** [all] Error 2
      
      ...maybe we could tuck in an additional sed to remove the whitespace, like:
      
      [...]
      fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
          $(AM_V_GEN) $(CPP) -I$(top_srcdir) $< | \
          $(SED) 's/^\s*//;s/\s*,\s*/,/;' | \
          $(GREP) '^[^#]' | \
          $(AWK) '/CUT_OUT_BEGIN/,/CUT_OUT_END/ { next; }; { print; };' \
          > $@.tmp && \
          mv -f $@.tmp $@
      [...]
      
      though I'm not sure what kind of guarantee CPP can give us/what easier option I might have missed...
      32c1d32c
    • Behdad Esfahbod's avatar
      Fix build around true/false · b1510145
      Behdad Esfahbod authored
      b1510145
    • Behdad Esfahbod's avatar
      Trying to fix distcheck · 538f1579
      Behdad Esfahbod authored
      Doesn't work though :(.  Building docs is very fragile...
      
      At least, if docbook is present, distcheck passes now.
      538f1579
    • Behdad Esfahbod's avatar
      Fix more warnings. · 46ab96b8
      Behdad Esfahbod authored
      Linux build and mingw32 cross build warning-free now.
      46ab96b8
  7. 02 Jan, 2013 13 commits