This is the mail archive of the 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] basic_filebuf: 45628 + non-modal I/O

On Sep 23, 2010, at 3:13 PM, David Krauss wrote:

> Fair nuff. The elimination of _M_reading/writing was something I anticipated to have a high
> risk/reward ratio in the first place… maybe that affected my approach to it. Although the basic
> change is mostly accomplished with a search+replace to substitute the function calls for data
> members, the secondary changes had a surprising cascade effect. Caching always_noconv
> alters the invariants of _M_codecvt. The semantics of _M_post_overflow are unsatisfactory
> considering exceptions, so right now I'm working on changing it to _M_need_unshift. That is
> also potentially cleaner, but upon trying to debug it, I got hit with a testcase failures, including
> an imbue testcase! (Diagnosing that right now.)

Turned out I was using _M_codecvt on a closed file. I had to indent all of seekoff to fix the bug,
but otherwise no big deal. Test coverage of that case is pretty good!

> As I said before embarking on this round, and again in the last message, there are other
> things to do. There are a number of tangible benefits to having overflow preserve any
> unwritten part of the put area, including the standard specifically requiring it. So I'll try to wrap
> this up, post it to the list for posterity, and we can revisit this cluster later.

Here it is:

Attachment: filebuf_state_theworks.patch
Description: Binary data

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