This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: [Various] libc/1208: segfault in fclose on fdopen'ed FILE pointer
- To: Andreas Jaeger <aj@arthur.rhein-neckar.de>
- Subject: Re: [Various] libc/1208: segfault in fclose on fdopen'ed FILE pointer
- From: Andreas Schwab <schwab@suse.de>
- Date: 19 Jul 1999 10:06:44 +0200
- Cc: james@and.org,libc-alpha Mailinglist <libc-alpha@sourceware.cygnus.com>,Sascha Schumann <sascha@schumann.cx>
- References: <u8yagdsxqq.fsf@arthur.rhein-neckar.de> <nnzp0tagmq.fsf@code.and.org> <u8d7xpsmwl.fsf@arthur.rhein-neckar.de>
Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:
|> >>>>> James Antill writes:
|>
|> James> My man page says that fdopen _doesn't_ dup the fd ... so doing the
|> James> close is bogus ... and if egcs-1.1.2 has re-ordered the close/fclose
|> James> that might give a SEGV ?
The compiler must not reorder function calls, unless it can prove that the
calls are free of side effects (which they are not).
Andreas.
--
Andreas Schwab "And now for something
schwab@suse.de completely different."
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg