Mail Archives: cygwin/2004/08/19/03:50:10
I read one previous post from July 28, 2004 about a similar issue, but
there were no responses. My application successfully allocates memory
many times, then segfaults when mallocing a new struct:
assert((N=(SymbolNode*)malloc(sizeof(SymbolNode)))!=NULL);
It runs correctly on a Sun system (specific version information located
lower in body of this message) that I use at school. I tested my system
using Prime95's torture test, but didn't find any problems. My
conclusion is that either I'm doing something wrong or there's a bug in
the cygwin.dll
Your help is apperciated.
/*
* information from GDB
*/
Program received signal SIGSEGV, Segmentation fault.
0x610b446b in random () from /usr/bin/cygwin1.dll
(gdb) info thread
2 thread 3168.0xc4c 0x7ffe0304 in ?? ()
* 1 thread 3168.0xb78 0x610b446b in random () from /usr/bin/cygwin1.dll
(gdb) backtrace
#0 0x610b446b in random () from /usr/bin/cygwin1.dll
#1 0x6105c476 in dll_entry AT 12 () from /usr/bin/cygwin1.dll
#2 0x6108df2f in cygwin1!aclcheck () from /usr/bin/cygwin1.dll
#3 0x00403400 in internSymbolTable (S=0xa05bbe0, t=0xa056828, a=2060, s=0,
flag=0x22ef84, params=0x0) at symboltable.c:243
#4 0x004042d3 in declare (root=0xa056828, attrib=2060, paramNum=0,
paramPtr=0xa0568d8) at tokenast.c:266
#5 0x00404596 in buildSymbolTable (t=0xa051ed0, flag=0) at tokenast.c:305
#6 0x004018ad in main (argc=3, argv=0xa051138) at main.c:145
(gdb) thread 2
[Switching to thread 2 (thread 3168.0xc4c)]#0 0x7ffe0304 in ?? ()
(gdb) backtrace
#0 0x7ffe0304 in ?? ()
#1 0x77f5bfb4 in ntdll!ZwReadFile () from ntdll.dll
#2 0x77e7abbd in ReadFile () from /cygdrive/c/WINDOWS/system32/kernel32.dll
#3 0x000006f8 in ?? ()
/*
* fails when built and run on the following system
*/
$ uname -a
CYGWIN_NT-5.1 CHN_PC-MM10 1.5.10(0.116/4/2) 2004-05-25 22:07 i586
unknown unknown Cygwin
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /GCC/gcc-3.3.1-3/configure --with-gcc --with-gnu-ld
--with-gnu-
as --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--libexe
cdir=/usr/sbin --mandir=/usr/share/man --infodir=/usr/share/info
--enable-langua
ges=c,ada,c++,f77,pascal,java,objc --enable-libgcj
--enable-threads=posix --with
-system-zlib --enable-nls --without-included-gettext
--enable-interpreter --enab
le-sjlj-exceptions --disable-version-specific-runtime-libs
--enable-shared --dis
able-win32-registry --enable-java-gc=boehm
--disable-hash-synchronization --verb
ose --target=i686-pc-cygwin --host=i686-pc-cygwin --build=i686-pc-cygwin
Thread model: posix
gcc version 3.3.1 (cygming special)
/*
* program runs correctly when built and executed on the following
* system.
*/
bash-2.03$ uname -a
SunOS unix2 5.8 Generic_117000-03 sun4u sparc SUNW,Ultra-80
bash-2.03$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/l
d --disable-nls
Thread model: posix
gcc version 3.3.2
--
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 -