Launchpad has imported 5 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=69034.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2013-09-06T13:19:58+00:00 Marek Kašík wrote:

Created attachment 85352
Make usage of freetype thread safe

Current freetype backend is not thread safe. It can cause segmentation
fault when threads are not properly handled by applications which use
cairo (see https://bugzilla.redhat.com/show_bug.cgi?id=678397 and its
duplicates).

Attached patch tries to fix this problem by creating FT_Library object
for each thread. This is recommended solution by freetype
(http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/freetype.h#n1684).

It adds a hash table to which FT_Library is added if a new thread needs
one. Thread IDs are used as keys for this table.

Marek

Reply at:
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1199571/comments/5

------------------------------------------------------------------------
On 2013-09-06T17:58:01+00:00 Freedesktop wrote:

Unfortunately that FreeType "recommendation" is red herring.  First,
people are free to pass around FT_Face among threads, and second, we
will be leaking stuff this way, unless we add proper TLS support.

At any rate.  I suggest we use cairo for all glyph rasterizer instead.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1199571/comments/6

------------------------------------------------------------------------
On 2013-12-16T06:16:19+00:00 Freedesktop wrote:

Chris, any chance you have some time to think about this?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1199571/comments/7

------------------------------------------------------------------------
On 2014-07-31T16:45:44+00:00 Freedesktop wrote:

*** Bug 81874 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1199571/comments/20

------------------------------------------------------------------------
On 2014-07-31T16:59:16+00:00 Freedesktop wrote:

Looks like copying thread-local storage macros from pixman-compiler.h
and using them to use per-thread FT_Library might easily get most of
this resolved.  I can take a look if no one else steps in.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1199571/comments/21


** Changed in: libcairo
       Status: Unknown => Confirmed

** Changed in: libcairo
   Importance: Unknown => Critical

** Bug watch added: Red Hat Bugzilla #678397
   https://bugzilla.redhat.com/show_bug.cgi?id=678397

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1199571

Title:
  Huge multi-threading violations in cairo

To manage notifications about this bug go to:
https://bugs.launchpad.net/libcairo/+bug/1199571/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to