Re: Librsvg 2.41.0 is released

On 01/12/2017 08:11 AM, Federico Mena Quintero wrote:
How does one get this to happen?  

Is it only a problem if two threads race to pass the same type_name to

Or if a library defines a shitty foo_get_type() without the g_once
magic from G_DEFINE_TYPE(), and gets called from two threads?

Even the g_once magic is not enough because they would have separate
data sections for the static cached type id. So the get_type() for the
failed registration would have G_TYPE_INVALID.

But even if you were careful to do a g_type_from_name() as a fallback,
you still risk the statically linked implementations being incompatible
from version skew.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]