This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++/10101: [3.0/3.2/3.3/3.4 regression] seekp() on std::strstreamcan break reading back from the stream


The following reply was made to PR libstdc++/10101; it has been noted by GNATS.

From: Andrew Pollard <Andrew dot Pollard at brooks-pri dot com>
To: gcc-gnats at gcc dot gnu dot org,  gcc-bugs at gcc dot gnu dot org,  nobody at gcc dot gnu dot org, 
 gcc-prs at gcc dot gnu dot org,  andrew at andypo dot net,  bkoz at gcc dot gnu dot org
Cc:  
Subject: Re: libstdc++/10101: [3.0/3.2/3.3/3.4 regression] seekp() on std::strstream
 can break reading back from the stream
Date: Mon, 24 Mar 2003 19:06:56 +0000

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10101
 
 [ 3rd attempt to get this into the audit trail... ]
 
 bkoz at gcc dot gnu dot org commented:
 
  >    This is not a bug that I can reproduce on mainline.
  >
  >    Patch posted here:
  >    http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01455.html
 
 OK, I can also confirm that it appears to work with the current CVS head
 code. Although I think that it is due to the changes in
 
        libstdc++-v3/include/std/std_streambuf.h
 
 that went in recently...
 
 revision 1.14
 date: 2003/02/24 18:22:57;  author: paolo;  state: Exp;  lines: +25 -30
 2003-02-24  Paolo Carlini <pcarlini at unitus dot it>
              Nathan Myers <ncm at cantrip dot org>
 
          PR libstdc++/9404, PR libstdc++/9701 (partial)
          (aka pptr == epptr implies overflow)
          * include/bits/fstream.tcc (_M_allocate_internal_buffer):
          Consistently, _M_out_end points to the end of the buffer just
          created.
 ....
 
 [ ie I think this has the effect of moving the egptr() as stuff is written
 into the strstream, so that underflow isn't getting called... ]
 
 An older version of 3.4 (CVS as of 28th Jan 2003) shows the problem that
 saw.
 
 gcc-3.2.3 and gcc-3.3 definitely have the problem.
 
 I think my patch is probably correct for ::underflow and strstream's if
 underflow actually ever gets called...
 
 Andrew.
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]