> 'ThreadRootStartingPoint' runs the user code in ThreadMain in the __cThread
> class and cleans up when ThreadMain returns.  This is where the crash is.

Do you mean it's right after ThreadMain() returns?  As a note, you don't
need the exception socket in the select() (unless you're doing something I
can't figure out here).  If all you're doing is sleeping, the following
works just as well:

Sleep_us (int iMicroseconds)
{
        // Resist the temptation to make any of these static, as doing so
makes us Non-MT-Safe!

        struct timeval tval;
        tval.tv_sec = iMicroseconds / 1000000;
        tval.tv_usec = iMicroseconds % 1000000;
        select(0, NULL, NULL, NULL, &tval);

        return (0);
}

I'm suspicious about the way you're getting rid of the threads.  You have
the thread change itself to a detached state and then commit suicide.  I
would look at cleaning up the threads a different way and see if your
problem disappears.

The only other thing I see that could be causing problems is the char
buffer that you use for ERR_error_string(), although you'd pick that up
pretty quick if it were overflowing.

--Chris

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to