gcc/libstdc++-v3
Jonathan Wakely 85d0fad469 PR libstdc++/68197 fail on negative iword/pword indices
The suggested resolution of LWG 3083 is to make invalid indices
undefined, but we can fairly easily check for them and treat them as
errors in the same way as allocation failure. This avoids a segfault or
worse, setting an error flag on the stream instead.

	PR libstdc++/68197
	* include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
	indices to unsigned.
	* src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
	as failure. Refactor error handling.
	* testsuite/27_io/ios_base/storage/68197.cc: New.

From-SVN: r259854
2018-05-02 20:04:55 +01:00
..
config PR libstdc++/83834 replace wildcard pattern in linker script 2018-01-16 12:43:08 +00:00
doc Update libstdc++ manual in preparation for GCC 8 release 2018-04-11 01:21:35 +01:00
include PR libstdc++/68197 fail on negative iword/pword indices 2018-05-02 20:04:55 +01:00
libsupc++
po
python printers.py (build_libstdcxx_dictionary): Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers registration. 2018-03-09 05:56:07 +00:00
scripts
src PR libstdc++/68197 fail on negative iword/pword indices 2018-05-02 20:04:55 +01:00
testsuite PR libstdc++/68197 fail on negative iword/pword indices 2018-05-02 20:04:55 +01:00
acinclude.m4 PR libstdc++/84654 Disable __float128 specializations for -mno-float128 2018-05-01 23:47:33 +01:00
aclocal.m4
ChangeLog PR libstdc++/68197 fail on negative iword/pword indices 2018-05-02 20:04:55 +01:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
config.h.in PR libstdc++/84654 Disable __float128 specializations for -mno-float128 2018-05-01 23:47:33 +01:00
configure PR libstdc++/84654 Disable __float128 specializations for -mno-float128 2018-05-01 23:47:33 +01:00
configure.ac PR libstdc++/81797 Add .NOTPARALLEL to include/Makefile for darwin 2018-02-15 20:56:41 +00:00
configure.host
crossconfig.m4 PR libstdc++/84773 use aligned alloc functions for FreeBSD and MinGW cross-compilers 2018-03-12 22:52:16 +00:00
fragment.am
linkage.m4
Makefile.am
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.