This is the mail archive of the
mailing list for the Cygwin project.
Re: Statically initialising pthread attributes in dynamic dlls.
On 23/02/2010 17:28, Andrew West wrote:
> Further to this ( possibly instead of this ). When the code reaches this
> point inside the call to pthread_mutexattr_init;
> if ((*object)->magic != magic)
> Shouldn't the SEH contain the cytls exception handler as the first item
> in the list? I seem to have 4 things before it;
I think the OS has wrapped the call to DllMain in its own handler that gets
in ahead of cygwin's. When the pthread_mutex stuff throws during validating
the verifyable object, the OS catches it, says "oops! there's been an
exception during DllMain, this DLL is faulty" and unmaps it. Then
LoadLibraryW returns an error status to dlopen, but the problem is that
there's an unpopped return address on the tls sigfe stack, and when dlopen
tries to return it jumps into that (now unmapped) space.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple