[Fontconfig] Cache version bump plus new version

Behdad Esfahbod
Mon, 16 Nov 2009 23:37:00 -0000

Hi,

Previously FcLangSet was defined as:

struct _FcLangSet {
     FcChar32    map[NUM_LANG_SET_MAP];
     FcStrSet    *extra;
};

Which meant that if enough new .orth files are added to change the value of
NUM_LANG_SET_MAP, that struct changes layout, and the cache layout will
change.  This is indeed what happened between 2.6.0 and 2.7.x and was causing
crashes since *extra was getting bogus values and then redirected.

To fix that I''ve restructured the structure to:

struct _FcLangSet {
     FcStrSet    *extra;
     FcChar32    map_size;
     FcChar32    map[NUM_LANG_SET_MAP];
};

and changed the code to respect map_size.  As a result I''ve bumped the
cache
version from 2 to 3.  This is pushed to master.

I plan to release this as 2.8.0.  Will appreciate some testing in the mean
while though.  I may make a 2.7.90 snapshot later tonight or tomorrow.  Or may
release 2.8.0 straight.

behdad