Problems with running C++-programs under glibc-2.1.[1-2] and gcc-2.95
Bernd Nottelmann
nottelm@PTP283.UNI-MUENSTER.DE
Wed Jul 21 14:00:00 GMT 1999
Hi,
I have updated my glibc from version 2.0.7 to 2.1.1 resp. 2.1.2 and
now I have the problem with running any C++-program containing
stream input/output.
Example:
// --------------
#include <iostream>
int main()
{
cout << "Hello\n";
}
// --------------
# g++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95/specs
gcc version 2.95 19990718 (prerelease)
# g++ -g couttst.C
# gdb a.out
GNU gdb 4.18
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 "i686-pc-linux-gnu"...
(gdb) run
Starting program: /mnt/sdb2/home/nottelm/cprg/a.out
Program received signal SIGSEGV, Segmentation fault.
0x400d53b4 in __overflow () from /lib/libc.so.6
(gdb) where
#0 0x400d53b4 in __overflow () from /lib/libc.so.6
#1 0x400d41b5 in _IO_new_file_xsputn () from /lib/libc.so.6
#2 0x40041eba in filebuf::xsputn () at ../../../libio/filebuf.cc:116
#3 0x40045b12 in ostream::operator<< () at ../../../libio/iostream.cc:517
#4 0x80485c8 in main () at couttst.C:5
(gdb)
I have recompiled gcc-2.95 under the new libc-2.2.1 system but the
bug remained, and I don't know if this is a egcs- or a glibc-problem.
First I suspected the different libio/libio.h implementation of both
glibc and egcs, copied the libio/libio.h file from glibc to egcs and recompiled
the latter, but this didn't help. All potentially troublesome header files and
libraries were removed (as far I was able to find them).
I have also looked for other bug reports and found some on the debian
but they didn't contain any hints.
Bernd
More information about the Gcc-bugs
mailing list