On Mon, 2010-06-28 at 12:25 +0200, Mark Phalan wrote: > On Fri, 2010-06-25 at 21:43 +0100, Darryl Miles wrote: > > Mark Phalan wrote: > > > > > Except setting up locking at library setup time is inherently racy and > > > *cannot* be done safely. The *only* safe place to setup locking > > > callbacks is from the application. libraries cannot safely setup the > > > locking callbacks. > > > Just to make it clear why this is a problem imagine two threads running > > > on Solaris each concurrently dlopening a plugin. Each plugin is linked > > > against OpenSSL and tries to be a good citizen by setting the locking > > > callbacks. They have no way to synchronize and thus no way to avoid > > > racing against each other. > > > > This is my point. This is possible even on Sparc without setting up > > threading, please don't spread such misinformation. > > Actually i thought I was agreeing with you... I was backing up your > suggestion that more is needed from OpenSSL to more cleanly support > threading.
Guess I replied too quickly... I see why you thought I was spreading misinformation. Of course I agree that every library could be modified to use atomic instructions available on their CPU to synchronize. Its just a lot of modifications to be made considering the vast amount of code out there that uses OpenSSL. I'd like to see OpenSSL take care of this (which is what I though you were arguing for too). -M ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
