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++/66146] call_once not C++11-compliant on ppc64le Date: Tue, 16 Mar 2021 12:39:48 +0000 [thread overview] Message-ID: <bug-66146-4-0YlD42njAC@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-66146-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146 --- Comment #47 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:6ee24638ed0ad51e568c799bacf149ba9bd7628b commit r11-7688-g6ee24638ed0ad51e568c799bacf149ba9bd7628b Author: Jonathan Wakely <jwakely@redhat.com> Date: Fri Mar 12 11:47:20 2021 +0000 libstdc++: Revert to old std::call_once implementation [PR 99341] The new std::call_once implementation is not backwards compatible, contrary to my intention. Because std::once_flag::_M_active() doesn't write glibc's "fork generation" into the pthread_once_t object, it's possible for glibc and libstdc++ to run two active executions concurrently. This violates the primary invariant of the feature! This patch reverts std::once_flag and std::call_once to the old implementation that uses pthread_once. This means PR 66146 is a problem again, but glibc has been changed to solve that. A new API similar to pthread_once but supporting failure and resetting the pthread_once_t will be proposed for inclusion in glibc and other C libraries. This change doesn't simply revert r11-4691 because I want to retain the new implementation for non-ghtreads targets (which didn't previously support std::call_once at all, so there's no backwards compatibility concern). This also leaves the new std::call_once::_M_activate() and std::call_once::_M_finish(bool) symbols present in libstdc++.so.6 so that code already compiled against GCC 11 can still use them. Those symbols will be removed in a subsequent commit (which distros can choose to temporarily revert if needed). libstdc++-v3/ChangeLog: PR libstdc++/99341 * include/std/mutex [_GLIBCXX_HAVE_LINUX_FUTEX] (once_flag): Revert to pthread_once_t implementation. [_GLIBCXX_HAVE_LINUX_FUTEX] (call_once): Likewise. * src/c++11/mutex.cc [_GLIBCXX_HAVE_LINUX_FUTEX] (struct __once_flag_compat): New type matching the reverted implementation of once_flag using futexes. (once_flag::_M_activate): Remove, replace with ... (_ZNSt9once_flag11_M_activateEv): ... alias symbol. (once_flag::_M_finish): Remove, replace with ... (_ZNSt9once_flag9_M_finishEb): ... alias symbol. * testsuite/30_threads/call_once/66146.cc: Removed.
next prev parent reply other threads:[~2021-03-16 12:39 UTC|newest] Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-05-14 18:31 [Bug libstdc++/66146] New: " andrey.vul at gmail dot com 2015-05-15 8:55 ` [Bug libstdc++/66146] " redi at gcc dot gnu.org 2015-05-15 15:12 ` andrey.vul at gmail dot com 2015-05-15 17:40 ` msebor at gcc dot gnu.org 2015-05-15 20:31 ` redi at gcc dot gnu.org 2015-05-19 17:36 ` andrey.vul at gmail dot com 2015-05-20 0:11 ` msebor at gcc dot gnu.org 2015-05-20 14:12 ` redi at gcc dot gnu.org 2015-05-20 14:36 ` bugdal at aerifal dot cx 2015-05-20 14:46 ` jakub at gcc dot gnu.org 2015-05-20 14:47 ` redi at gcc dot gnu.org 2015-05-20 14:51 ` bugdal at aerifal dot cx 2020-05-07 11:56 ` jakub at gcc dot gnu.org 2020-06-27 18:18 ` pdimov at gmail dot com 2020-07-09 8:52 ` redi at gcc dot gnu.org 2020-08-27 13:56 ` kisha-nik at mail dot ru 2020-11-03 14:51 ` redi at gcc dot gnu.org 2020-11-03 18:45 ` cvs-commit at gcc dot gnu.org 2020-11-03 18:46 ` redi at gcc dot gnu.org 2020-11-03 18:46 ` redi at gcc dot gnu.org 2020-11-03 20:17 ` redi at gcc dot gnu.org 2020-12-17 9:08 ` tschwinge at gcc dot gnu.org 2020-12-17 9:58 ` redi at gcc dot gnu.org 2020-12-17 14:03 ` cvs-commit at gcc dot gnu.org 2021-02-04 15:16 ` libor.bukata at oracle dot com 2021-02-11 8:00 ` libor.bukata at oracle dot com 2021-02-11 13:29 ` redi at gcc dot gnu.org 2021-02-15 13:03 ` redi at gcc dot gnu.org 2021-02-15 14:13 ` bugdal at aerifal dot cx 2021-02-15 15:00 ` redi at gcc dot gnu.org 2021-02-15 17:08 ` bugdal at aerifal dot cx 2021-02-15 17:10 ` fw at gcc dot gnu.org 2021-02-15 17:30 ` bugdal at aerifal dot cx 2021-03-16 12:39 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-07 6:22 ` unlvsur at live dot com 2021-04-07 10:03 ` redi at gcc dot gnu.org 2021-04-19 10:40 ` redi at gcc dot gnu.org 2021-04-27 11:37 ` jakub at gcc dot gnu.org 2021-07-28 7:04 ` rguenth at gcc dot gnu.org 2022-02-10 23:20 ` redi at gcc dot gnu.org 2022-02-10 23:29 ` redi at gcc dot gnu.org 2022-12-02 1:25 ` lh_mouse at 126 dot com 2022-12-03 9:26 ` redi at gcc dot gnu.org 2024-03-14 11:55 ` cvs-commit at gcc dot gnu.org 2024-03-18 11:22 ` cvs-commit at gcc dot gnu.org 2024-03-18 14:03 ` cvs-commit at gcc dot gnu.org 2024-05-13 9:04 ` [Bug libstdc++/66146] call_once not C++11-compliant iains 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-66146-4-0YlD42njAC@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).