libstdc++/10478: stdio_filebuf corrupts output for buffer sizes 1,2,3The
paolo@gcc.gnu.org
paolo@gcc.gnu.org
Thu Apr 24 12:16:00 GMT 2003
Synopsis: stdio_filebuf corrupts output for buffer sizes 1,2,3The
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Thu Apr 24 11:39:22 2003
State-Changed-Why:
Already fixed for the forthcoming 3.3 release with:
2003-03-31 Paolo Carlini <pcarlini@unitus.it>
* include/ext/stdio_filebuf.h
(stdio_filebuf::stdio_filebuf(int, openmode, bool, size_t),
stdio_filebuf::stdio_filebuf(__c_file*, openmode, size_t):
_M_buf_size_opt == 0 means only "not to use an allocated buffer"
since a stack-based buffer is used for small values of the size_t
parameter.
* include/bits/fstream.tcc (basic_filebuf::_M_really_overflow).
If _M_buf_size != 0 flush out the buffer (any kind, stack-based too).
* testsuite/ext/stdio_filebuf_2.cc: New testfile.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10478
More information about the Gcc-bugs
mailing list