gcc/libstdc++-v3
Jonathan Wakely 1b749ae95e PR libstdc++/83860 avoid dangling references in valarray closure types
Store nested closures by value not by reference, to prevent holding
invalid references to temporaries that have been destroyed. This
changes the layout of the closure types, so change their linkage names,
but moving them to a different namespace.

	PR libstdc++/57997
	PR libstdc++/83860
	* include/bits/gslice_array.h (gslice_array): Define default
	constructor as deleted, as per C++11 standard.
	* include/bits/mask_array.h (mask_array): Likewise.
	* include/bits/slice_array.h (slice_array): Likewise.
	* include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
	to namespace __detail.
	(_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
	members.
	* include/bits/valarray_before.h (_ValArrayRef): New helper for type
	of data members in closure objects.
	(_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
	(_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
	__detail.
	(_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
	(_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
	(_SBase::_M_expr): Use _ValArrayRef for type of data members.
	* include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
	(_ValFunClos, _RefFunClos): Move to namespace __detail and add
	using-declarations to namespace std.
	* testsuite/26_numerics/valarray/83860.cc: New.

From-SVN: r259844
2018-05-02 17:41:46 +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++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
libsupc++ Update copyright years. 2018-01-03 11:03:58 +01:00
po Update copyright years. 2018-01-03 11:03:58 +01:00
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 Update copyright years. 2018-01-03 11:03:58 +01:00
src PR libstdc++/85442 fix duplicate debuginfo for cxx11-ios_failure.cc 2018-04-18 13:14:58 +01:00
testsuite PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +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++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +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 Update copyright years. 2018-01-03 11:03:58 +01:00
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 Update copyright years. 2018-01-03 11:03:58 +01:00
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.