kde and garbage collectors
Joseph Wenninger
jowenn at kde.org
Thu Aug 15 23:22:33 BST 2002
Hi
On Thursday 15 August 2002 19:34, Michael Matz wrote:
> Hi,
>
> On Thu, 15 Aug 2002, Joseph Wenninger wrote:
> > I noticed that that garbage collector only works, if the application
> > itself is linked against libgc. If only the dlopened library is linked
> > against libgc, it causes a crash. :((
>
> Better search for the cause of this. Do those libs using libgc replace
> malloc and friends, or do they use the gc_xxx functions directly? If the
> latter (and only then we can hope to have libgc linked to kdeinit) I
> wonder what would cause a crash when dlopen'ing. Possibly it's the
> RTLD_LOCAL with which our plugins are loaded normally? You would then
> need to dlopen libgc with RTLD_GLOBAL before loading the plugin.
>
Where can I tell the ComponentFactory to use RTLD_GLOBAL instead of RTLD_LOCAL
?
All libraries, which I saw yet, use the GC_malloc, GC_ .... functions
At the moment, it looks like the GC makes some assumption about the stack,
which aren't fullfilled in the dlopend case. At least the stack is corrupted
completely after the GC initialization. I'm still trying to find out, exactly
what happens, but had not much luck yet.
Kind regards
Joseph Wenninger
More information about the kde-core-devel
mailing list