This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Statically initialising pthread attributes in dynamic dlls.
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 25 Feb 2010 15:21:35 +0100
- Subject: Re: Statically initialising pthread attributes in dynamic dlls.
- References: <4B82C093.7010001@gmail.com> <4B83A727.3030101@gmail.com> <4B841026.1000905@gmail.com> <20100224004403.GA24591@ednor.casa.cgf.cx> <4B848353.2010209@gmail.com> <4B84B08C.7060302@gmail.com> <4B84B887.6070801@gmail.com> <4B856401.2000905@gmail.com> <20100224214459.GA19766@ednor.casa.cgf.cx> <4B867BBF.4010700@gmail.com>
- Reply-to: cygwin-patches at cygwin dot com
On Feb 25 13:31, Dave Korn wrote:
> On 24/02/2010 21:44, Christopher Faylor wrote:
>
> > Hmm. That would presumably cause the behavior that Dave Korn noted of
> > removing the handler after FreeLibrary returns. So you'd have to put it
> > there and in dlclose.
>
> The temporary handler in dll_dllcrt0_1 approach seems an awful lot simpler
> and more reliable to me than all this tedious mucking about in hyperspace...
> erm, I mean all this tedious unlinking and relinking the chain and hoping
> nothing bad happens during the window when we have no handler installed at
> all. Why don't we just fix it this way instead?
Did you test it on Windows Server 2008? I wrote this already in a
private email to cgf. The really serious problem which lead to the
changes in the SEH handling was that in the original code (which worked
more or less flawlessly for ages) the exception handler chain was
changed to an endless loop, so that the replacement SEH handler for
the Cygwin handler became... the Cygwin handler.
However, this stopped working with Server 2008. The code in Windows
2008 to check for the integrity of the SEH chain detected that and
restored the chain to the default of calling just the Windows default
exception handler.
The bottom line of this is, AFAICS, that changes to the SEH chain
handling in Cygwin should always be tested with Server 2008. Way
back I asked in the Microsoft NG m.p.w.p.kernel about this problem
and it turned out that the integrity checking is not built into the
desktop OSes like Vista or W7.
Btw., if you don't have a Server 2008 machine, just install from here:
http://msdn.microsoft.com/en-us/evalcenter/cc137233.aspx
Works fine as a VM. Even my Server 2008 domain controller is running in
a VM.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat