[Top][All Lists]

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

Re: ltdl resident modules are unloaded by lt_dlexit()

From: Bob Friesenhahn
Subject: Re: ltdl resident modules are unloaded by lt_dlexit()
Date: Tue, 29 Dec 2009 15:37:09 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Tue, 29 Dec 2009, Ralf Wildenhues wrote:

Do you have a small reproducible example (a way to see this easily with
GraphicsMagick would be fine as well)?

I don't have a small reproducible example. The situation where the problem occurs is with GraphicsMagick when the Jasper JPEG 2000 library is used. When the Jasper library is initialized (via its jas_init() function), it registers an atexit() handler which invokes its cleanup handler (jas_cleanup()). If the Jasper library becomes unloaded, then the cleanup handler is still invoked via the registered address. Some OS's handle this better than others. Microsoft Windows and FreeBSD result in a crash while Linux seems to remove stale atexit() handlers.

The best fix for the Jasper problem is to comment out its atexit() request, but there is no way to tell if a Jasper library has this treatment, so the safest solution is to try to never unload it. It seems that invoking lt_dlexit() causes Jasper to be unloaded even if the module which depended on it is indicated to be "resident".

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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