X-Spam-Check-By: sourceware.org Date: Tue, 23 May 2006 14:23:26 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: 1.5.19: changes have broken Qt3 Message-ID: <20060523182326.GB6138@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <044e01c67e8f$0abed720$a501a8c0 AT CAM DOT ARTIMI DOT COM> <447350C4 DOT 1080604 AT freenet DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <447350C4.1080604@freenet.de> User-Agent: Mutt/1.5.11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: 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 On Tue, May 23, 2006 at 08:13:24PM +0200, Ralf Habacker wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >Dave Korn schrieb: >> On 23 May 2006 18:10, Ralf Habacker wrote: >> >> Oh no, not this old saw again! >> >>> C:\cygwin\home\Habacker\src\pthreads-snap-2005-03-08\tests>strace >>> mutex1n | grep C0000005 >>> - --- Process 4872, exception C0000005 at 610B1005 >>> 155 78759 [main] mutex1n 4872 _cygtls::handle_exceptions: In >>> cygwin_except_handler exc 0xC0000005 at 0x610B1005 sp 0x22CC00 >> >> [ snip many more ]. >> >>> I identified the problem to the function pthread_mutexattr_init address >>> 0x610b1005 in which a null pointer (%eax below) causes this seg fault >> >> Yes, but it's wrapped in an exception handler. That's why you get to see an >> strace error message, rather than having the process exit. Names like >> "cygwin_except_handler" and "_cygtls::handle_exceptions" should have given you >> some clues about this > >Hmmh, I have learned to fix obviously problems instead let it handle by >an exception handler, which has several disadvantages. > >1. It costs additional runtime. In the mentioned designer i count 1653 >internal exceptions, which are caused by the null pointer issue. > >2. 70% of my strace output (1000 lines) are polluted by this internal >exceptions messages, which could be avoided by changing only on lines of >code. Do you think that this is the effort worth ? > >Are there more problems with this simple patch ? The obvious problem is that you have provided an analysis of the common code path. If the standard code path does not usually involve a NULL pointer then your patch introduces a statistically unneeded test, i.e., in your test case there are NNN internal exceptions but you haven't stated that your test case is the standard way that these functions would be used. If the standard code path involves non-NULL pointers then adding your test would mean a net slowdown. Also, since the current code is supposed to deal with the problem without your patch, your patch can't be considered as anything other than a band-aid until the reason for the problem is actually understood. cgf -- 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/