GNOME Bugzilla – Bug 687763
libxul apps (Firefox, thunderbird) regressed by automatic g_type_init() ctor
Last modified: 2018-05-24 14:48:17 UTC
First, they definitely emit a warning because they use g_slice_set_config to disable the slice allocator, but the gobject-init_ctor() ends up creating a hash table whch initializes gslice now. There are also possible indications they dlopen()/dlclose() libgobject, but that would be a separate bug if we find it. Introduced by https://bugzilla.gnome.org/show_bug.cgi?id=686161
The dlopen()/dlclose() suspicion was based on some bad guessing on my part. The problem that I was tracking was really a completely unrelated issue in evolution-data-server (as is used by Ubuntu's Thunderbird, via an addon).
*** Bug 692215 has been marked as a duplicate of this bug. ***
Copied from other bug: So here's an idea: we could come up with some symbol name like 'g_get_slice_allocator_config()' or something, and dlsym() that out of the process on libglib startup. If the user provides that function, we call it to determine what our configuration should be. I think it's probably good to continue to allow this (and Mozilla, for example, is quite upset to see it gone). I also can't think of a better way to do it...
My opinion: An api to configure gslice is really not a great idea. And if this is just about disabling it, then I think G_SLICE=always-malloc is a fine solution. That dlsym proposal sounds like the kind of hack that will come back to bite us at some point.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/625.