[Patch] _M_out_lim vs setp
Benjamin Kosnik
bkoz@redhat.com
Thu Apr 17 04:09:00 GMT 2003
>Basing on the semantics of _M_out_lim seems obvious that,
>upon setp() it should be equal to _M_out_beg. Then at each
>put operation it will move forward, toward _M_out_end.
>
>Consider, for instance, the effect of the _M_really_overflow
>call present in close(): if we didn't do any put operation
>we are not supposed to write out anything. However, since the
>former flushes all the chars between _M_out_beg and _M_out_lim,
>for a setp put area we end up writing garbage.
Aaagh.
Thanks for fixing this. Can you put this patch in, but also put the
first paragraph above into a comment in std_streambuf.h where the
_M_out_lim data member is introduced?
best,
benjamin
More information about the Libstdc++
mailing list