[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

null program crashes



Can someone figure this out? This simple C++ program
crashes.

I have a slink system, with both libstdc++2.8 and
libstdc++2.9.

--prashanth

wintermute:test >g++ --version 
egcs-2.90.27 980315 (egcs-1.0.2 release)

wintermute:test >cat /etc/debian_version 
2.1

wintermute:test >cat a.cc
main()
{
}
wintermute:test >g++ -o a a.cc
wintermute:test >a
Segmentation fault
wintermute:test >ldd a
        libm.so.6 => /lib/libm.so.6 (0x4000b000)
        libc.so.6 => /lib/libc.so.6 (0x40024000)
        ld-linux.so.2 => /lib/ld-linux.so.2 (0x400c9000)

wintermute:test >gdb a.out
GNU gdb 4.17.m68k.objc.threads.hwwp.fpu.gnat
Copyright 1998 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 "i486-pc-linux-gnu"...
(no debugging symbols found)...
(gdb) break main
Breakpoint 1 at 0x8048537
(gdb) run
Starting program:
/home/mundkur/qtplot/plot-0.00/test/a.out
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x400d291f in ?? () from /lib/libc.so.6


But, this works:

wintermute:test >egcc --version 
egcs-2.91.60 
wintermute:test>egcc -o a a.cc 
wintermute:test >a
wintermute:test >ldd a
        libc.so.6 => /lib/libc.so.6 (0x40010000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


Reply to: