This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.5.10-3 : strange crashes of gethostbyname() under gdb


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]