This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] libstdc++/6594
- From: Andreas Schwab <schwab at suse dot de>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 07 Jun 2002 23:04:00 +0200
- Subject: Re: [v3] libstdc++/6594
- References: <200205151255.g4FCtuE24270@waller.constant.com>
Benjamin Kosnik <bkoz@redhat.com> writes:
|> I'd much rather have people use std::stringstream. Oh well.
|>
|> tested x86/linux
|>
|> 2002-05-15 Benjamin Kosnik <bkoz@redhat.com>
|>
|> PR libstdc++/6594
|> * src/strstream.cc (strstreambuf): Fix leak.
You missed one case in strstreambuf::overflow(int). This is tested on
i386-suse-linux.
2002-06-07 Andreas Schwab <schwab@suse.de>
* src/strstream.cc (strstreambuf::overflow): Set _M_buf,
_M_buf_size and _M_buf_size_opt to the new buffer and size.
--- libstdc++-v3/src/strstream.cc.~1.8.16.1.~ 2002-05-21 16:54:15.000000000 +0200
+++ libstdc++-v3/src/strstream.cc 2002-06-07 16:32:10.000000000 +0200
@@ -182,6 +182,8 @@ strstreambuf::int_type strstreambuf::ove
old_get_offset = gptr() - eback();
}
+ _M_buf = buf;
+ _M_buf_size = _M_buf_size_opt = new_size;
setp(buf, buf + new_size);
pbump(old_size);
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."