This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/81395] [5/6/7/8 Regression] basic_filebuf::overflow recurses and overflows stack


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81395

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
PR 45708 suggested that _M_reading and _M_writing aren't needed. I haven't
found a patch to implement that, but I haven't looked too hard.

You make a good point that going into uncommitted mode with _M_reading == true
isn't done elsewhere. I don't understand the state machine, so I'm very unsure
about changing anything here. But _M_set_buffer(0) seems wrong, since that
causes an unwanted(?) call to this->setp(_M_buf, _M_buf + _M_buf_size - 1);
from xsgetn.

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