RTLD_GLOBAL again (was Re: kdeutils/kregexpeditor/test)

Neil Stevens neil at qualityassistant.com
Sat Apr 20 00:38:23 BST 2002


On Friday April 19, 2002 04:33, Lubos Lunak wrote:
> On Saturday 20 April 2002 01:02, Waldo Bastian wrote:
> > On Friday 19 April 2002 03:38 pm, Lubos Lunak wrote:
> > >  I've now again read the whole 'KDE hackers, please read' thread on
> > > gcc@ and we listed 2 problems there: Name clashes and unloading.
> > > From the replies it looks like the unloading is fixed already, so
> > > the only problem remaining are the name clashes.
> >
> > The problem with the name clashes is that they are mostly beyond our
> > control. Making sure not to have name-clashes is relative easy in KDE
> > CVS. It is much harder to prevent name-clashes between plugins
> > independently developed by two different third parties. (A third and a
> > fourth party >:-)
> >
> > It took us a month to realize that a name-clash was introduced in KDE
> > CVS and was causing crashes. If ksirc would not have been in KDE cvs I
> > am pretty sure we would have released KDE 3.1 with a "class Item" in
> > the global namespace because we wouldn't have noticed anything wrong.
> > Why do you think this would be different with 3rd party plugin/part
> > developers?
>
>  Because we could write a script that would check that a
> kdemodule_LTLIBRARIES plugins is namespace clean and abort compilation
> if it wouldn't be? Ok, nothing so drastic, at least because of
> compilation time, but as I said, I think it should be quite easy to
> check that a plugin is namespace clean and incorporate it in the build
> system (we could even have 'Micr^H^H^H^H KDE-certified' plugins >:) ).
> This would be also documented somewhere in the plugins writing docs, and
> people not bothering to comply will simply risk writting plugins that
> will crash - they will be asking for it after all. And using namespaces
> is not that hard, just putting almost everything in .h and .cpp files in
> 'namespace Foo { ... }' and it's done (oh, and in case uic still can't
> handle namespaces, fixing it too).

But how do you ensure that two modules don't use the same namespace?  Seems 
to me that using namespaces might just reduce the probability of a clash, 
rather than eliminate clashes.

-- 
Neil Stevens - neil at qualityassistant.com
"I always cheer up immensely if an attack is particularly wounding
because I think, well, if they attack one personally, it means they
have not a single political argument left." - Margaret Thatcher





More information about the kde-core-devel mailing list