gcc/libstdc++-v3/testsuite/30_threads
Jonathan Wakely 9e18a25331 libstdc++: Allow std::condition_variable waits to be cancelled [PR103382]
std::condition_variable::wait(unique_lock<mutex>&) is incorrectly marked
noexcept, which means that the __forced_unwind exception used by NPTL
cancellation will terminate the process. It should allow exceptions to
pass through, so that a thread can be cleanly cancelled when waiting on
a condition variable.

The new behaviour is exported as a new version of the symbol, to avoid
an ABI break for existing code linked to the non-throwing definition of
the function. Code linked against older releases will have a reference
to the @GLIBCXX_3.4.11 version, andcode compiled against the new
libstdc++ will get a reference to the @@GLIBCXX_3.4.30 version.

libstdc++-v3/ChangeLog:

	PR libstdc++/103382
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.11): Do not export old
	symbol if .symver renaming is supported.
	(GLIBCXX_3.4.30): Export new symbol if .symver renaming is
	supported.
	* doc/xml/manual/evolution.xml: Document change.
	* doc/html/manual/api.html: Regenerate.
	* include/bits/std_mutex.h (__condvar::wait, __condvar::wait_until):
	Remove noexcept.
	* include/std/condition_variable (condition_variable::wait):
	Likewise.
	* src/c++11/condition_variable.cc (condition_variable::wait):
	Likewise.
	* src/c++11/compatibility-condvar.cc (__nothrow_wait_cv::wait):
	Define nothrow wrapper around std::condition_variable::wait and
	export the old symbol as an alias to it.
	* testsuite/30_threads/condition_variable/members/103382.cc: New test.
2021-12-09 22:58:19 +00:00
..
async
barrier Add options to link with libatomic in various tests. 2021-03-10 16:01:12 +00:00
call_once libstdc++: Revert to old std::call_once implementation [PR 99341] 2021-03-16 12:25:28 +00:00
condition_variable libstdc++: Allow std::condition_variable waits to be cancelled [PR103382] 2021-12-09 22:58:19 +00:00
condition_variable_any
future improve future::poll calibration loop 2021-03-31 15:45:56 -03:00
headers
jthread libstdc++: Make std::jthread support pointers to member functions [PR 100612] 2021-10-01 20:36:55 +01:00
latch Add options to link with libatomic in various tests. 2021-03-10 16:01:12 +00:00
lock libstdc++: Simplify std::try_lock and std::lock further 2021-06-22 21:17:25 +01:00
lock_guard libstdc++: Remove redundant -std=gnu++17 option from concurrency tests 2021-05-10 16:22:53 +01:00
mutex
packaged_task
promise c++: limit instantiation with ill-formed class [PR96286] 2021-08-30 17:25:21 -04:00
recursive_mutex
recursive_timed_mutex
scoped_lock libstdc++: Remove redundant -std=gnu++17 option from concurrency tests 2021-05-10 16:22:53 +01:00
semaphore libstdc++: Fix for deadlock in std::counting_semaphore [PR100806] 2021-06-22 11:06:07 -07:00
shared_future
shared_lock libstdc++: Remove redundant -std=gnu++17 option from concurrency tests 2021-05-10 16:22:53 +01:00
shared_mutex libstdc++: Remove redundant -std=gnu++17 option from concurrency tests 2021-05-10 16:22:53 +01:00
shared_timed_mutex
stop_token [libstdc++] Fix test timeout in stop_calback/destroy.cc 2021-04-21 13:28:08 -07:00
this_thread
thread libstdc++: Remove unary_function base classes from std::thread tests 2021-10-01 20:36:54 +01:00
timed_mutex
try_lock libstdc++: Avoid "__lockable" name defined as macro by newlib 2021-06-23 11:05:51 +01:00
unique_lock libstdc++: Simplify std::try_lock and std::lock further 2021-06-22 21:17:25 +01:00