public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/7636: ofstream corrupts first 16k of text file output
@ 2002-08-19 13:41 a.b.taylor
  0 siblings, 0 replies; 2+ messages in thread
From: a.b.taylor @ 2002-08-19 13:41 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7636
>Category:       libstdc++
>Synopsis:       ofstream corrupts first 16k of text file output
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 19 10:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Allen B. Taylor
>Release:        3.0.3
>Organization:
>Environment:
DJGPP under Win2K
>Description:
The following C++ program behaves incorrectly (see attached). Examining testio.txt reveals the first 16k bytes or so to be garbage, followed by valid data that would have ordinarily appeared at that point. Lower values for i's limit, like 16000, work fine.

Looks like this is fixed in 3.0.4 (djgpp/v2gnu/gcc304b.zip) and also in 3.1 (djgpp/v2gnu/gcc31b.zip). Just wanted to mention it in case someone wanted to include it in the regression tests.
>How-To-Repeat:
#include <fstream>
main()
{
    using namespace std;
    ofstream tout("testio.txt");
    for (int i = 0; i < 16500; i++)
    {
        if (i != 0 && i % 72 == 0)
            tout << '\n';
        tout << 'x';
    }
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: libstdc++/7636: ofstream corrupts first 16k of text file output
@ 2002-11-19 12:36 bkoz
  0 siblings, 0 replies; 2+ messages in thread
From: bkoz @ 2002-11-19 12:36 UTC (permalink / raw)
  To: a.b.taylor, bkoz, gcc-bugs, gcc-prs, nobody

Synopsis: ofstream corrupts first 16k of text file output

Responsible-Changed-From-To: unassigned->bkoz
Responsible-Changed-By: bkoz
Responsible-Changed-When: Mon Nov 11 15:26:45 2002
Responsible-Changed-Why:
    Mine.
State-Changed-From-To: open->closed
State-Changed-By: bkoz
State-Changed-When: Mon Nov 11 15:26:45 2002
State-Changed-Why:
    Thanks for your bug report! Tests to check for this are now part of the libstdc++ package.
    
    best,
    benjamin

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7636


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

end of thread, other threads:[~2002-11-11 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19 13:41 libstdc++/7636: ofstream corrupts first 16k of text file output a.b.taylor
2002-11-19 12:36 bkoz

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