gcc/libstdc++-v3/testsuite
Jonathan Wakely 30b41cfbb2 libstdc++: handle small max_blocks_per_chunk in pool resources [PR 94160]
When a pool resource is constructed with max_blocks_per_chunk=1 it ends
up creating a pool with blocks_per_chunk=0 which means it never
allocates anything. Instead it returns null pointers, which should be
impossible.

To avoid this problem, round the max_blocks_per_chunk value to a
multiple of four, so it's never smaller than four.

libstdc++-v3/ChangeLog:

	PR libstdc++/94160
	* src/c++17/memory_resource.cc (munge_options): Round
	max_blocks_per_chunk to a multiple of four.
	(__pool_resource::_M_alloc_pools()): Simplify slightly.
	* testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
	Check that valid pointers are returned when small values are
	used for max_blocks_per_chunk.
2020-09-10 15:42:09 +01:00
..
17_intro libstdc++: Do not check "cold" name on darwin [PR 96736] 2020-08-21 18:24:40 +01:00
18_support libstdc++: Break header cycle between <new> and <exception> 2020-09-02 13:56:32 +01:00
19_diagnostics libstdc++: Ensure c++NN effective target present in all C++17 tests 2020-07-31 19:58:02 +01:00
20_util libstdc++: handle small max_blocks_per_chunk in pool resources [PR 94160] 2020-09-10 15:42:09 +01:00
21_strings libstdc++: Remove tests for self-move debug assertions 2020-08-25 16:36:01 +01:00
22_locale
23_containers libstdc++: Fix three-way comparison for std::array [PR 96851] 2020-09-02 15:32:11 +01:00
24_iterators libstdc++: Fix std::indirectly_readable ambiguity [LWG 3446] 2020-08-24 16:18:31 +01:00
25_algorithms libstdc++: Skip PSTL tests when installed TBB is too old [PR 96718] 2020-08-21 12:01:05 +01:00
26_numerics libstdc++: Optimise GCD algorithms 2020-09-03 12:46:13 +01:00
27_io libstdc++: Add deprecated attributes to old iostream members 2020-08-19 12:13:23 +01:00
28_regex libstdc++: Ensure c++NN effective-target present in more tests 2020-07-31 19:58:03 +01:00
29_atomics libstdc++: Ensure c++NN effective target present in all C++17 tests 2020-07-31 19:58:02 +01:00
30_threads libstdc++: Adjust static assertions in futures and promises [LWG 3466] 2020-08-25 15:52:57 +01:00
abi
backward
config
data
decimal
experimental libstdc++: Optimise GCD algorithms 2020-09-03 12:46:13 +01:00
ext
lib diagnostics: Add new option -fdiagnostics-plain-output 2020-08-14 09:29:19 -04:00
libstdc++-abi
libstdc++-dg
libstdc++-prettyprinters libstdc++: Remove inheritance from elements in std::tuple 2020-08-17 15:27:51 +01:00
libstdc++-xmethods
performance
special_functions
std libstdc++: Fix arithmetic bug in chrono::year_month::operator+ 2020-08-27 14:11:24 -04:00
tr1 libstdc++: Ensure c++NN effective-target present in more tests 2020-07-31 19:58:03 +01:00
tr2
util libstdc++: Make testsuite usable with -fno-exceptions 2020-07-30 12:50:02 +01:00
Makefile.am
Makefile.in