[cairo-bugs] [Bug 103037] Segmentation fault in _cairo_traps_compositor_glyphs

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Oct 6 18:23:13 UTC 2017


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

--- Comment #7 from Mikhail Fludkov <fludkov.me at gmail.com> ---
(In reply to Uli Schlachter from comment #6)
> Also, doesn't the if(likely(once->completed)) at the beginning of the
> function need an _cairo_atomic_int_get() around it?
My colleague and me discussed it for quite a while, as it was not obvious at
the first glance. The conclusion was that it should be ok. If for whatever
reason it is not True after we read it, all the following reads/writes to it
are atomic, so we should be fine. Another benefit of this implementation
compared to the proposed earlier spinlock is that after initialization is
finished we don't use slower atomic loads. So performance wise it is exactly
the same as the code that used to be there before. 

> Would be fine by me, but does this really need a struct with two ints? Just
> have 0=UNINITIALIZED, 1=INITIALIZING, and 2=INITIALIZED and one int is
> enough. (Yes, this makes the implementation a bit more complicated).
I agree I will change the patch.

-- 
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/20171006/41ca750b/attachment.html>


More information about the cairo-bugs mailing list