Re: linking / performance / interposing detection ...



On Fri, 2005-12-09 at 14:36 +0000, michael meeks wrote:

> 	So - as part of my -Bdirect work - trying to detect genuine cases of
> interposing - I ran my simple perl script over all my gnome libraries:
> http://go-oo.org/ooo-build/bin/finterpose (for which I attach the gnome
> specific exclusions file [this incidentally shows lots of other bad
> behavior in Gnome ;-]):

Very neat.  How do interposed symbols happen?  Is it just people
forgetting to put a "static" somewhere?  That seems to be the case for
parent_class in metal_gtk2_engine.c.

> 	So - I guess, this shouldn't be -that- concerning in some ways - but
> looking further - it *seems* that the loading of themes is done in such
> a way as to include them in the global symbol search path:
> 
> gtk/gtkthemes.c:
>   engine->library = g_module_open (engine_path, 0);
> 
> 	Q1: is it possible to have 2 gtk themes loaded concurrently ? and if so
> - why don't we see hideous problems wrt. 'theme_init' being looked up
> incorrectly in the 2nd theme ?

Yes, we can load any number of theme engines simultaneously.
Fortunately no one cooks gtkrc files that are so fucked up to actually
do this :)

> 	Q2: -why- are we routinely loading all these nice separated plugin
> libraries into the global symbol search scope ?

Ignorance about what each option does, probably :)

> 	I guess the fix would be to use G_MODULE_BIND_LOCAL ( at least -
> assuming that does the right thing ) - in all the g_module_opens - which
> would surely be a fairly painless change / patch ?

Makes sense.  I'm patching gtk-engines right now for the "static"s; it
would be good to file bugs for the other modules which need BIND_LOCAL
changes.

  Federico




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