This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

segfault when calling fclose(...)


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]