This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
segfault when calling fclose(...)
- To: egcs at cygnus dot com
- Subject: segfault when calling fclose(...)
- From: Anthony Seward <seward at hplyot dot obspm dot fr>
- Date: Fri, 27 Mar 1998 15:35:41 +0100 (CET)
Deep inside the innards of a certain library that I need to use, a call
is made to fclose(FILE *stream) without first testing to see if 'stream'
is a null pointer. In the test program for the library one of
the routines is invoked in such a way as to test the response of the
system to a fclose(0x0) and ensure that the system responds with the
proper error (as per man pages). When the test program is run, however,
I get a segmentation fault. I am using glibc 2.0 and gcc 2.7.2.3 (i.e.
RedHat 5.0). I searched the glibc 2.0 bug reports database and didn't
find anything. Is it possible that this a problem caused by compiling
glibc with gcc 2.7 and if so, might compilation of glibc with egcs fix
it?
Tony