[cairo] Thread-safety and library versions

Chris Wilson chris at chris-wilson.co.uk
Tue Sep 17 06:09:02 PDT 2013


On Tue, Sep 17, 2013 at 02:44:53PM +0200, Uli Schlachter wrote:
> Hi,
> 
> On 17.09.2013 14:16, Weeble wrote:
> [...]
> > More specifically, I'm running libcairo 1.12.14 and libfontconfig
> > 2.10.2. When Mono repeatedly creates cairo drawing contexts, calls
> > cairo_select_font_face, and destroys the drawing contexts; (with each
> > context accessed only from a single thread, but more than one thread
> > running at once;) sooner or later it crashes when
> > _cairo_toy_font_face_destroy calls _cairo_hash_table_remove and raises
> > an assertion, apparently because the key is missing from the hash
> > table.
> 
> I was thinking "it can't be that simple" and produced the attached test program
> which does exactly this. The result with current cairo from git:
> 
> a.out: cairo-hash.c:506: _cairo_hash_table_lookup_exact_key: Assertion
> `!"reached"' failed.
> 
> Could someone with more clue about how things are supposed to work take a look
> at this? Chris? Behdad?

Sure, that looks to be a race inside toy-font. 
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list