From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24127 invoked by alias); 24 Mar 2003 19:16:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24112 invoked by uid 71); 24 Mar 2003 19:16:00 -0000 Date: Mon, 24 Mar 2003 19:46:00 -0000 Message-ID: <20030324191600.24111.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Andrew Pollard Subject: Re: libstdc++/10101: [3.0/3.2/3.3/3.4 regression] seekp() on std::strstream can break reading back from the stream Reply-To: Andrew Pollard X-SW-Source: 2003-03/txt/msg01621.txt.bz2 List-Id: The following reply was made to PR libstdc++/10101; it has been noted by GNATS. From: Andrew Pollard To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org, andrew@andypo.net, bkoz@gcc.gnu.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@gcc.gnu.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 Nathan Myers 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.