This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: dlclose not calling destructors of static variables.
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Fri, 29 Jan 2010 13:40:40 -0500
- Subject: Re: dlclose not calling destructors of static variables.
- References: <4B61732F.4030804@gmail.com> <20100129093215.GI9479@calimero.vinschen.de> <4B62E512.6030307@gmail.com>
- Reply-to: cygwin-developers at cygwin dot com
On Fri, Jan 29, 2010 at 01:39:30PM +0000, Dave Korn wrote:
>On 29/01/2010 09:32, Corinna Vinschen wrote:
>> Dave,
>>
>> would you mind to have a look into that one? Since you have been
>> playing with C++ constructors/desctructors a lot lately...
>
> Replied on main list :)
I just checked in a fix/workaround for this problem.
IMO, gcc really should be using __cxa_atexit. The change I just checked
in is a workaround for the fact that there is no way for the atexit
handler to know that a to-be-called function was registered in a dso.
If gcc was using __cxa_atexit this probably would not have been a
problem, although there would still be more cygwin DLL work required
to make this work at dll unload time.
cgf