This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [Patch] _M_out_lim vs setp


>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


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