X-Spam-Check-By: sourceware.org Date: Thu, 30 Mar 2006 23:59:58 +0200 Message-Id: <471575897@web.de> MIME-Version: 1.0 From: Bernhard Loos To: cygwin AT cygwin DOT com Subject: Re: dlopen() bug (new testcase) Content-Type: text/plain; charset=iso-8859-15 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k2UM0FeV028553 -----Ursprüngliche Nachricht----- Von: Eric Blake Gesendet: Thu, 30 Mar 2006 15:04:27 +0000 (UTC) >Bernhard Loos web.de> writes: >> >> >You'll have to read the archives. Eric Blake has talked about this very >> >recently. >> >> Sorry, but I'm unable to locate it. The last post mentioning IsBad*Ptr >occoured >> arround March 2005 - not very recently. > >http://cygwin.com/ml/cygwin/2006-03/msg00455.html > >The gist of it is that IsBad*Ptr is a syscall, and a relatively >dangerous one at that - Microsoft documents that it is not threadsafe, >and that calling IsBadWritePtr on a stack guard page will disable >the ability to grow that stack, meaning that the next time you >write to the guard page your process will just quit (no popup >box, no exception, nothing - just quit). On the other hand, an >exception handler is faster in the normal case of good pointers, >does not corrupt system state of whether the stack guard page can >grow, and does not cause data races with other threads. > >-- >Eric Blake Thank you very much for explaining this in detail. I have read the other message bevor, but it doesn't really explain the problems with IsBadReadPtr. I was able to track the problem down, inserting a call to _my_tls.init_exception_handler (_cygtls::handle_exceptions); in the function dll::init() solves it. But I'm unsure, whether it introduce other bugs. If somebody has checked this, I could submit a patch, if necessary. Bernhard Loos _______________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/