This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/81395] [5/6/7/8 Regression] basic_filebuf::overflow recurses and overflows stack
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 13 Jul 2017 12:04:18 +0000
- Subject: [Bug libstdc++/81395] [5/6/7/8 Regression] basic_filebuf::overflow recurses and overflows stack
- Auto-submitted: auto-generated
- References: <bug-81395-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81395
--- Comment #13 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Hi,
> It looks strange, because usually _M_set_buffer(-1) is used for uncommitted
> mode, but what it's actually doing is nuking the buffers. The next read
> would need to do an underflow to refill the get area (which is correct), or
> the next write would need to do a seek and then an overflow to make a put
> area available (which is correct).
Indeed, you are making explicit some vague thoughts of mine, which, by and
large pointed in the direction that uncommited mode may well be fine, modulo
possible performance implications, like, again very vague thoughts, we end up
re-reading something which we already read. Those cases I was hoping you could
investigate a bit ;)