public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103382] condition_variable::wait() is not cancellable because it is marked noexcept Date: Thu, 09 Dec 2021 23:27:23 +0000 [thread overview] Message-ID: <bug-103382-4-7UEqyKgvCj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103382-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103382 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:9e18a25331fa25c3907249fede65a02c6817b06e commit r12-5877-g9e18a25331fa25c3907249fede65a02c6817b06e Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue Dec 7 15:11:15 2021 +0000 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.
next prev parent reply other threads:[~2021-12-09 23:27 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-23 13:01 [Bug libstdc++/103382] New: " vanyacpp at gmail dot com 2021-11-23 13:06 ` [Bug libstdc++/103382] " vanyacpp at gmail dot com 2021-11-23 13:44 ` redi at gcc dot gnu.org 2021-11-24 14:46 ` vanyacpp at gmail dot com 2021-11-24 22:10 ` redi at gcc dot gnu.org 2021-12-09 23:27 ` cvs-commit at gcc dot gnu.org [this message] 2021-12-09 23:38 ` redi at gcc dot gnu.org 2022-09-06 12:35 ` vanyacpp at gmail dot com 2022-09-06 12:53 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103382-4-7UEqyKgvCj@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).