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 Message-ID: <00ad01c44eed$39166080$0200a8c0@em.noip.com> From: "Enzo Michelangeli" To: Cc: "\"Igor Pechtchanski\"" References: <000201c44bd0$308638c0$0200a8c0 AT em DOT noip DOT com> Subject: Re: 1.5.10-3 : strange crashes of gethostbyname() under gdb Date: Thu, 10 Jun 2004 21:12:34 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit ----- Original Message ----- From: "Igor Pechtchanski" To: "Enzo Michelangeli" Cc: Sent: Monday, June 07, 2004 4:25 AM Subject: Re: 1.5.10-3 : strange crashes of gethostbyname() under gdb > On Sun, 6 Jun 2004, Enzo Michelangeli wrote: > > > I'm not sure it's my setup, but since I upgraded to Cygwin 1.5.10-3 > > gdb crashes when executing trivial calls to gethostbyname: > > [snip] > > > > Strangely enough, no SIGSEGV seems to occur if I don't run gdb. > > > > For the record, my Windows is an ancient Win98SE. The version of gdb > > should be the latest; for some reason it identifies itself as > > 2003-09-20-cvs, although according to setup.exe it should be slightly > > older, 20030919-1 (the other alternative offered is 20030303-1). > > > > Enzo > > I don't know if it's related, but the newer versions of the Cygwin > runtime use a function from Kernel32.dll (IsBadWritePtr) that produces > (and later handles) an intentional SIGSEGV. Since the SIGSEGV is > handled, it's not seen outside of gdb. Did you try continuing a few > times? For me (on Win2k), 4 continues do the trick, and the program > completes normally. > Igor Uhm, yes it does, but when I try to exit the application gdb hangs. The handling of the SIGSEGV by gdb could be better, I think ;-) ... By the way, downgrading to the version 1.5.9-1 of the Cygwin DLL solves the crashes in gethostbyname(), but they still occur in pthread_mutexattr_init() :-( ----------------- 8< ----------------- 68 pthread_mutexattr_init(&attr); (gdb) Program received signal SIGSEGV, Segmentation fault. 0xbff7a606 in KERNEL32!Heap32ListNext () from /cygdrive/c/WINDOWS/SYSTEM/KERNEL32.DLL (gdb) ----------------- 8< ----------------- (Unfortunately I can't use static initialization of the mutex because this doesn't appear to be supported for recursive mutexes by the "Pthreads for WIN32" implementation at http://sources.redhat.com/pthreads-win32/ , and I need to develop cross-platform code; I have sent a separate message on that issue to the list pthreads-win32 AT sources DOT redhat DOT com). Enzo -- 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/