libstdc++/98: Outputting streambufs to a stream is broken
bgarcia@laurelnetworks.com
bgarcia@laurelnetworks.com
Wed Oct 18 13:37:00 GMT 2000
>Number: 98
>Category: libstdc++
>Synopsis: Outputting streambufs to a stream is broken
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 18 13:37:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: bgarcia@laurelnetworks.com
>Release: unknown-1.0
>Organization:
>Environment:
libstdc++ v. 2.8.1
redhat linux x86 6.2, gcc 2.95.2
>Description:
Outputting a streambuf to a stream is broken.
This appears to be similar to PR 92, but does not appear
to be fixed by the same fix.
>How-To-Repeat:
First, create a file called "conf" with at least 1500
lines of "1234567890".
Next compile the following program:
#include <fstream>
#include <iostream>
int main(int argc, char** argv)
{
std::ifstream file;
file.open("conf");
if (!file.is_open())
{
return -1;
}
std::cout << file.rdbuf();
return 0;
}
Next, run this program as "./junk > conf2
and compare conf to conf2.
host> wc conf*
1500 1500 16500 conf
2234 2235 24576 conf2
host> diff conf conf2 | head
1500a1501,2235
> 4567890
> 1234567890
> 1234567890
> 1234567890
> 1234567890
> 1234567890
> 1234567890
> 1234567890
> 1234567890
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Libstdc++-prs
mailing list