[cairo] Evince crash in FT_Get_PS_Font_Info

Behdad Esfahbod behdad at behdad.org
Mon Apr 28 09:03:48 PDT 2008


On Mon, 2008-04-28 at 09:08 +0100, Chris Wilson wrote:
> On Sun, 2008-04-27 at 02:07 -0400, Behdad Esfahbod wrote:
> > Hi,
> > 
> > I came across this bug:
> > 
> >   https://bugs.launchpad.net/ubuntu/+source/evince/+bug/157797
> > 
> > Looks to me like an evince bug freeing FT_Face before cairo is done with
> > it, but thought I post here so people better at this can check it out.
> 
> Been there, done that, wrote the patch. ;-)
> http://cgit.freedesktop.org/poppler/poppler/commit/?id=42db4890e8295aaec5a1be12d1414fc0a9048550

Ah right.  I saw that going by.  Somehow I thought it was a mozilla
patch.  Doesn't make sense now that I think about it ;).

Two notes:

  - cairo doesn't use the face behind poppler's back.  It looks like
there should be a poppler lifecycle issue involved as well, and your
patch actually hiding the bug.  Just a thought.  And what about the
actual font file data, is that kept alive anyway?

  - Can update the documentation with the fact that the face should be
kept alive as long as the cairo_font_face_t is alive, and add sample
code using user_data for handling it.

Thanks,

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



More information about the cairo mailing list