This is the mail archive of the
mailing list for the Cygwin project.
Re: Statically initialising pthread attributes in dynamic dlls.
On 24/02/2010 00:44, Christopher Faylor wrote:
> I never saw the cygwin exception handler on the list twice when I was
> debugging this. That isn't supposed to happen and I don't see how it
> could happen unless Windows is doing it since the code in
> _cygtls::init_exception_handler is supposed to prevent that and, if it
> was on the list twice bad stuff happened.
> That actually looks like a typo above since you seem to have typed the
> same address twice.
> Anyway, I've revisited this code, just like I knew I would, and have
> added YA in a long series of tweaks which seems to fix your particular
> problem. The fix is in the latest snapshot.
:( I think I can see where the next problem is going to arise already.
If we move el to the front of the list each time, what's going to happen
when we eventually return from LoadLibrary, and el.prev is still pointing at
the now-deallocated stack frames where LoadLibrary created its temporary
EXCEPTION_REGISTRATION structures ?
I was thinking of adding a stack (possibly only two-level) instead of
relinking the single el member to the front, but either way we have to find
some way to unlink it again when the stack unwinds.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple