[Bug libstdc++/81395] [6/7 Regression] basic_filebuf::overflow recurses and overflows stack
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 23 17:47:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81395
--- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Mon Oct 23 17:47:10 2017
New Revision: 254018
URL: https://gcc.gnu.org/viewcvs?rev=254018&root=gcc&view=rev
Log:
PR libstdc++/81395 fix crash when write follows large read
Backport from mainline
2017-07-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/81395
* include/bits/fstream.tcc (basic_filebuf::xsgetn): Don't set buffer
pointers for write mode after reading.
* testsuite/27_io/basic_filebuf/sgetn/char/81395.cc: New.
Added:
branches/gcc-6-branch/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/81395.cc
Modified:
branches/gcc-6-branch/libstdc++-v3/ChangeLog
branches/gcc-6-branch/libstdc++-v3/include/bits/fstream.tcc
More information about the Gcc-bugs
mailing list