www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/10/09:19:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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" <em AT em DOT no-ip DOT com>
To: <cygwin AT cygwin DOT com>
Cc: "\"Igor Pechtchanski\"" <pechtcha AT cs DOT nyu DOT edu>
References: <000201c44bd0$308638c0$0200a8c0 AT em DOT noip DOT com> <Pine DOT GSO DOT 4 DOT 58 DOT 0406061622000 DOT 19464 AT slinky DOT cs DOT nyu DOT edu>
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

----- Original Message ----- 
From: "Igor Pechtchanski" <pechtcha AT cs DOT nyu DOT edu>
To: "Enzo Michelangeli" <em AT em DOT no-ip DOT com>
Cc: <cygwin AT cygwin DOT com>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019