libtool
[Top][All Lists]
Advanced

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

Re: ltdl resident modules are unloaded by lt_dlexit()


From: Gary V. Vaughan
Subject: Re: ltdl resident modules are unloaded by lt_dlexit()
Date: Sat, 26 Dec 2009 15:53:31 +0700

Howdy Bob,

On 25 Dec 2009, at 07:02, Bob Friesenhahn wrote:
> I have a module which uses a library which sometimes registers an atexit() 
> handler to clean itself up.  If lt_dlexit() is invoked, then any modules 
> loaded by libltdl are then unloaded.  Unfortunately, when the module is 
> unloaded, the library it referenced crashes due to the atexit().  I tried 
> using both lt_dladvise_resident() and lt_dlmakeresident() to mark the module 
> as resident so that it can not be unloaded, but the program still crashes at 
> exit.  It is not clear to me if the module was still unloaded, or if the 
> problem is that the library it depends on was still unloaded.
> 
> Thoughts?

IIRC there is some #defineable debug symbol that will dump the list of loaded 
libraries at strategic times (and a dump function that can be called from the 
libltdl client code to add new strategic checks of the loaded library list).  
You can find it by grepping for 'dump' in the libltdl sources.

Please try recompiling with that symbol defined, and use the dump function to 
verify what libraries have been erroneously unloaded just before the crash 
occurs.

Cheers,
    Gary
-- 
Gary V. Vaughan (address@hidden)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]