Recent strstream regression: reversion needed?

Michael Veksler VEKSLER@il.ibm.com
Tue Jun 4 03:57:00 GMT 2002


bkoz@nabi.net wrote:

> No. It's necessary. That memory is allocated, it needs to be cleaned up.
> 
> Try adding
>
>       _M_buf = buf;
>
> in strstreambuf::overflow.
>
> I've a patch attached, but I have to run now. It's the above, with a
> strstream reformat. You might check it out if you're interested. I'll
> try to finish it up tomorrow. I think it'll do the job.

I added the change manually (I don't like to incorporate huge
patches).

It almost does it. Most of my unit tests run flawlessly (before 
this patch, they all used to crash). Yet, there is one pesky
and huge test that shows memory corruption (with the original
patch reverted *all* tests pass).

The code is complex (about 30,000 LOC), and cannot be easily reduced to
a reasonable sized test case. (Maybe I can do that after working on it a 
day,
or two -- I don't have time for that).



More information about the Libstdc++ mailing list