KLibLoader is crashing

Thiago Macieira thiago at kde.org
Mon Sep 3 07:09:05 BST 2007


Andreas Hartmetz wrote:
>Hmm. Are you saying that it's technically impossible or very hard to
>  make library unloading not dangerous, or just that KDE doesn't
> implement it right? Reference counting should work if unloading is
> doable. It semi-works in kmail for folders and it should be very easy
> to get right for libraries as library loading/unloading is so uncommon
> that you can easily check all the relevant code paths for correctness.

I'm saying that unloading is dangerous everywhere, not just with KDE.

It's extremely hard to check all relevant code paths: you need to make 
sure that there is no object lying around pointing to a vtable in that 
module, you need to make sure that the static destructors won't do 
anything funky, etc.

And this applies to the module itself as well as to any libraries it 
loads.

Now add that the order of unloading the dependency libraries might be 
different than the reverse of their loading, since other modules may be 
keeping them open.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070903/944951df/attachment.sig>


More information about the kde-core-devel mailing list