public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: segfault when calling fclose(...)
       [not found] <199803271435.PAA03330.cygnus.egcs@horatio.obspm.fr>
@ 1998-03-30 17:28 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 1998-03-30 17:28 UTC (permalink / raw)
  To: egcs

seward@hplyot.obspm.fr (Anthony Seward) writes:

> 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).

The argument given to fclose() must be a valid file handle.  NULL is
none and the glibc implementation does not test for this error in the
calling program.  Beside this, this is no problem with egcs so there
is no need to send this message to this list.

-- Uli
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

* segfault when calling fclose(...)
@ 1998-03-27  6:31 Anthony Seward
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Seward @ 1998-03-27  6:31 UTC (permalink / raw)
  To: egcs

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-03-30 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <199803271435.PAA03330.cygnus.egcs@horatio.obspm.fr>
1998-03-30 17:28 ` segfault when calling fclose(...) Ulrich Drepper
1998-03-27  6:31 Anthony Seward

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).