[cairo-bugs] [Bug 103037] New: Segmentaion failt in _cairo_traps_compositor_glyphs
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Sep 29 09:17:15 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=103037
Bug ID: 103037
Summary: Segmentaion failt in _cairo_traps_compositor_glyphs
Product: cairo
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: chris at chris-wilson.co.uk
Reporter: fludkov.me at gmail.com
QA Contact: cairo-bugs at cairographics.org
Created attachment 134564
--> https://bugs.freedesktop.org/attachment.cgi?id=134564&action=edit
gdb stacktrace
Hello,
We use Cairo & Pango for rendering in multiple threads. No memory is shared
between the threads. The rendering is done on independent image surfaces. I
have seen crashes with similar looking stacktraces for a while and think
finally got to the bottom of it. I think it happens due to a race condition in
libcairo.
The program segfaults while trying to call NULL function pointer here
https://cgit.freedesktop.org/cairo/tree/src/cairo-traps-compositor.c?h=1.14#n2314
I found that `compositor` points to a static structure and its contents are
half initialized. At the same time, there is another thread in
https://cgit.freedesktop.org/cairo/tree/src/cairo-image-compositor.c?h=1.14#n1259
in a process of initializing `static cairo_traps_compositor_t compositor;`
which is used in the first thread.
I'm attaching gdb stacktrace as an example of the crash. Looking at the code
there are a couple of other places where libcairo lazily initializes it's
statically allocated memory. Is there a way to "prepare" the library and
initialize it's structures and static mutexes to "workaround" the race
conditions like the one I'm facing right now?
The libraries used libcairo 1.14.0, libpango1.0-0 1.36.8
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20170929/9ec69b52/attachment-0001.html>
More information about the cairo-bugs
mailing list