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]

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


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:

-------------------------------
$ gdb --args test/q
GNU gdb 2003-09-20-cvs (cygwin-special)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-cygwin"...(no debugging symbols
found)...
(gdb) r
Starting program: /home/em/KadC/test/q.exe

Program received signal SIGSEGV, Segmentation fault.
0xbff7a606 in KERNEL32!Heap32ListNext ()
   from /cygdrive/c/WINDOWS/SYSTEM/KERNEL32.DLL
(gdb)
-------------------------------

The source code is very simple:

-------------------------------
#include <netdb.h>
#include <sys/socket.h>

int main(int ac, char *av[]) {
 struct hostent *hp;

 hp = gethostbyname("emnb");
 return 0;
}
-------------------------------

After reinstalling 1.5.9-1 everything has gone back to normal.

-------------------------------
$ gdb --args test/q
GNU gdb 2003-09-20-cvs (cygwin-special)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-cygwin"...(no debugging symbols
found)...
(gdb) r
Starting program: /home/em/KadC/test/q.exe
---Type <return> to continue, or q <return> to quit---

Program exited normally.
(gdb)
-------------------------------

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


--
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]