gcc/libstdc++-v3/testsuite
Jonathan Wakely 07e03761a7 libstdc++: Fix infinite loop in std::binomial_distribution [PR114359]
The multiplication (4 * _M_t * __1p) can wraparound to zero if _M_t is
unsigned and 4 * _M_t wraps to zero. The third operand has type double,
so do the second multiplication first, so that we aren't multiplying
integers.

libstdc++-v3/ChangeLog:

	PR libstdc++/114359
	* include/bits/random.tcc (binomial_distribution::param_type):
	Ensure arithmetic is done as type double.
	* testsuite/26_numerics/random/binomial_distribution/114359.cc: New test.
2024-03-19 15:59:44 +00:00
..
17_intro libstdc++: Fix experimental/names.cc failure on AIX 2024-02-02 13:54:02 +00:00
18_support Update copyright years. 2024-01-03 12:19:35 +01:00
19_diagnostics Update copyright years. 2024-01-03 12:19:35 +01:00
20_util libstdc++: Fix parsing of fractional seconds [PR114244] 2024-03-07 22:52:49 +00:00
21_strings libstdc++: Fix constexpr basic_string union member [PR113294] 2024-02-12 18:18:04 -05:00
22_locale libstdc++: Implement C++26 std::text_encoding (P1885R12) [PR113318] 2024-01-17 11:49:11 +00:00
23_containers libstdc++: Fix N3344 behavior on _Safe_iterator::_M_can_advance 2024-03-18 22:30:55 +01:00
24_iterators libstdc++: Implement P2836R1 changes to const_iterator 2024-01-15 15:13:53 -05:00
25_algorithms libstdc++: Add nodiscard in <algorithm> 2024-03-14 16:58:15 +00:00
26_numerics libstdc++: Fix infinite loop in std::binomial_distribution [PR114359] 2024-03-19 15:59:44 +00:00
27_io libstdc++: Consistently use noexcept, constexpr, nodiscard on bitmask ops 2024-02-28 11:27:46 +00:00
28_regex Update copyright years. 2024-01-03 12:19:35 +01:00
29_atomics libstdc++: Add missing clear_padding in __atomic_float constructor 2024-03-14 15:06:47 +00:00
30_threads libstdc++: Make std::function deduction guide support explicit object functions [PR113335] 2024-02-02 13:54:02 +00:00
abi Update copyright years. 2024-01-03 12:19:35 +01:00
backward Update copyright years. 2024-01-03 12:19:35 +01:00
config Update copyright years. 2024-01-03 12:19:35 +01:00
data
decimal Update copyright years. 2024-01-03 12:19:35 +01:00
experimental libstdc++: Fix noexcept on dtors in <experimental/scope> [PR114152] 2024-02-28 14:50:13 +00:00
ext libstdc++: Add nodiscard in <algorithm> 2024-03-14 16:58:15 +00:00
lib libstdc++: Sync the atomic_link_flags implementation with GCC. 2024-03-19 12:53:31 +00:00
libstdc++-abi Update copyright years. 2024-01-03 12:19:35 +01:00
libstdc++-dg Update copyright years. 2024-01-03 12:19:35 +01:00
libstdc++-prettyprinters libstdc++: Move test error_category to global scope 2024-03-13 21:25:14 +00:00
libstdc++-xmethods Update copyright years. 2024-01-03 12:19:35 +01:00
performance Update copyright years. 2024-01-03 12:19:35 +01:00
special_functions Update copyright years. 2024-01-03 12:19:35 +01:00
std libstdc++: Fix std::format("{}", negative_integer) [PR114325] 2024-03-14 16:58:15 +00:00
tr1 libstdc++: Fix testsuite with -Wformat 2024-01-06 15:11:33 +00:00
tr2 Update copyright years. 2024-01-03 12:19:35 +01:00
util libstdc++: Fix typos in MemoryChecker assertion messages in PSTL tests 2024-03-19 15:20:07 +00:00
Makefile.am Update copyright years. 2024-01-03 12:19:35 +01:00
Makefile.in libstdc++: Add support for running tests with multiple -std options 2023-09-15 21:57:38 +01:00