This is the mail archive of the
mailing list for the Cygwin project.
Re: Patch for silent crash with Cygwin1.dll v 1.5.19-4
- From: Gary Zablackis <gzabl at yahoo dot com>
- To: cygwin-patches at cygwin dot com, Bernhard Loos <bernloos at web dot de>
- Date: Thu, 13 Apr 2006 05:48:22 -0700 (PDT)
- Subject: Re: Patch for silent crash with Cygwin1.dll v 1.5.19-4
> The exception handler is supposed to be initialized
> _cygtls::init_thread which is called from
> Why is that not happening?
It does happen. However, later on when the program
calls dlopen () (which will happen, e.g., when a
python program imports a dll), LoadLibrary () gets
called. LoadLibrary () then installs its own exception
handler. The MS exception handler does NOT pass
control back to the Cygwin exception handler (it is
not obligated to).
What is causing our problem is that when LoadLibrary
() loads a dll, the following sequence of events
occurs (NOTE: I have left out some of the intervening
calls in the following sequence):
_cygwin_dll_entry@12 () calls dll_dllcrt0 ()
which calls dll::init()
which calls per_module::run_ctors
which calls pthread::once ()
which calls pthread_key_create ()
which has the code:
if (efault.faulted ())
if ((*object)->magic != magic)
This last bit generates an exception which gets
handled by the MS exception handler which decides the
error must be fatal to the loading of the dll and
sends us back to dlopen ().
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around