filebuf::underflow() bug in VS2005's stdlibrary
- From: Ulrich Eckhardt <eckhardt@xxxxxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 16:42:41 +0200
I'm not exactly sure which of the four snextc/sgetc/underflow/uflow is the
culprit but std::filebuf of VC8 skips every second character.
This chain of calls occurs:
snextc()
sbumpc()
uflow()
sgetc()
underflow()
uflow()
snextc() should advance to and return the next character. For that, it just
calls sbumpc() which advances to the next character and then returns that
via sgetc().
Problem is that underflow() calls uflow() but uflow() reads and advances,
i.e. since it is called twice in this graph it skips every second
character.
Note: there are some circumstances for this that could be important in order
to reproduce the bug. One is that I'm using a custom codecvt facet and the
other is that I'm using text-mode (I think these two together disable
internal buffering via gptr() etc).
Is this problem already known, is there a fix available already? I can
provide more details if necessary.
Uli
.
- Prev by Date: Re: best way of copy istream to ostream
- Next by Date: Re: best way of copy istream to ostream
- Previous by thread: best way of copy istream to ostream
- Next by thread: STLPort in VC++ - Compile problems
- Index(es):