This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: [Various] libc/1616: core dump after changing buffer using setvbuf
- To: libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>
- Subject: Re: [Various] libc/1616: core dump after changing buffer using setvbuf
- From: Andreas Schwab <schwab at suse dot de>
- Date: Fri, 3 Mar 2000 13:45:20 +0100
- Cc: r dot de dot vries at fokkerspace dot nl
- References: <u84saol5vy.fsf@gromit.rhein-neckar.de>
Andreas Jaeger <aj@suse.de> writes:
|> Hi glibc folks,
|>
|> we've received the appended bug report together with a patch that
|> should fix the problem.
|>
|> Could somebody please check whether the fix is correct? Ulrich told
|> me privatly that he thinks the problem should be elsewhere.
That's correct.
\begin{quote}[C9x-draft, 7.19.5.6]
[#2] The setvbuf function may be used only after the stream
pointed to by stream has been associated with an open file
and before any other operation (other than an unsuccessful
call to setvbuf) is performed on the stream.
\end{quote}
The program invokes undefined behaviour.
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg