gcc/libstdc++-v3/testsuite/20_util/allocator
Jonathan Wakely f92a504fdd libstdc++: Make allocators throw bad_array_new_length on overflow [LWG 3190]
std::allocator and std::pmr::polymorphic_allocator should throw
std::bad_array_new_length from their allocate member functions if the
number of bytes required cannot be represented in std::size_t.

libstdc++-v3/ChangeLog:

	* config/abi/pre/gnu.ver: Add new symbol.
	* include/bits/functexcept.h (__throw_bad_array_new_length):
	Declare new function.
	* include/ext/malloc_allocator.h (malloc_allocator::allocate):
	Throw bad_array_new_length for impossible sizes (LWG 3190).
	* include/ext/new_allocator.h (new_allocator::allocate):
	Likewise.
	* include/std/memory_resource (polymorphic_allocator::allocate)
	(polymorphic_allocator::allocate_object): Use new function,
	__throw_bad_array_new_length.
	* src/c++11/functexcept.cc (__throw_bad_array_new_length):
	Define.
	* testsuite/20_util/allocator/lwg3190.cc: New test.
2020-10-05 15:18:56 +01:00
..
requirements Update copyright years. 2020-01-01 12:51:42 +01:00
1.cc Update copyright years. 2020-01-01 12:51:42 +01:00
8230.cc Update copyright years. 2020-01-01 12:51:42 +01:00
10378.cc Update copyright years. 2020-01-01 12:51:42 +01:00
14176.cc Update copyright years. 2020-01-01 12:51:42 +01:00
33807.cc Update copyright years. 2020-01-01 12:51:42 +01:00
89510.cc libstdc++: Avoid errors in allocator's noexcept-specifier (PR 89510) 2020-04-30 16:01:43 +01:00
lwg3190.cc libstdc++: Make allocators throw bad_array_new_length on overflow [LWG 3190] 2020-10-05 15:18:56 +01:00
overaligned.cc Update copyright years. 2020-01-01 12:51:42 +01:00
rebind_c++20.cc Update copyright years. 2020-01-01 12:51:42 +01:00
void.cc Update copyright years. 2020-01-01 12:51:42 +01:00