kdecore/util/klauncher_iface.h - why oh why?
Lubos Lunak
l.lunak at suse.cz
Sun Apr 5 20:36:57 BST 2009
Hello,
could somebody please explain why kdecore installs and exports something that
- is internal API of KLauncher?
- is a manually included version of something that's easily generated
- is outdated (and as such different) from when generated again
?
Each of these is enough as a reason against.I had a lot of fun and time
trying to figure out why ksmserver was crashing in a rather specific case
(internally called 'collective effort to make kdeinit a complex way to say
execve', but I'll get to whining about that one later).
And more importantly, does somebody have any idea how to get rid of it? Was
that really meant to be public API?
The crash I was getting was because ksmserver normally builds its own copy to
access the klauncher interface, but because this was a debug build (no symbol
visibility, no fancy symbol binding, no inlining), the linker bound ksmserver
references to the kdecore copy. That one is not binary compatible -> really
funny things happening. And it should be possibly for this to happen even
with normal builds, not everything in the generated code is inline, and not
all symbols use the recent fancy linker tricks.
Thinking of it, this generated code should be in anonymous namespace if it is
not guaranteed that it will stay binary compatible. Most of it is inline
anyway and such clashes can happen anywhere as soon as such two copies are
used by one process.
--
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12 tel: +420 284 028 972
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz
More information about the kde-core-devel
mailing list