[Fontconfig-bugs] [Bug 69845] race condition issue?

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 5 20:13:22 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=69845

--- Comment #12 from Behdad Esfahbod <freedesktop at behdad.org> ---
(In reply to comment #11)
> (In reply to comment #10)
> > Why this change:
> > 
> > - memset (new->map, '\0', sizeof (new->map));
> > - memcpy (new->map, ls->map, FC_MIN (sizeof (new->map), ls->map_size *
> > sizeof (ls->map[0])));
> > + memcpy (new->map, ls->map, sizeof (ls->map));
> > 
> > It's wrong.
> 
> unrelated to this matter but isn't it a duplicate? is there any assumption
> that the size of new->map and ls->map is different? map_size is always set
> to NUM_LANG_SET_MAP and no reallocation on map too. hmm, architecture
> related thing? that said we have separate caches per architectures. there
> shouldn't be the case which we deal with different size of FcChar32.

The idea is that whenever we add new orth files, we don't have to bump up the
cache version.  So, the langset may be coming from a cache file generated by
older fontconfig and hence having fewer entries.  I added this after hours of
very hard to debug issues when this actually happened a few years ago.  I don't
think it's a bad assumption.  Bumping cache version every time we add a
language sounds a bit excessive.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig-bugs/attachments/20131206/6918762f/attachment.html>


More information about the Fontconfig-bugs mailing list