public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pdimov at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/114865] [13/14/15 Regression] std::atomic<X>::compare_exchange_strong seems to hang under GCC 13 for C++11 Date: Sat, 27 Apr 2024 00:38:35 +0000 [thread overview] Message-ID: <bug-114865-4-qrY97SK22k@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114865-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114865 --- Comment #11 from Peter Dimov <pdimov at gmail dot com> --- So, basically, C++14 and above initialize the padding of ``` std::atomic<state_type> state{{ 0, 0x2222 }}; ``` in `main` to zero, which masks the problem in `generate`. (The problem in `generate` still exists because the assembly is identical - it just doesn't trigger because the padding is zero. If we manually poke something nonzero into the padding, it would (ought to) still break.) Static variables work for the same reason - the padding is guaranteed zero.
next prev parent reply other threads:[~2024-04-27 0:38 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-26 15:50 [Bug libstdc++/114865] New: std::atomic<X>::compare_exchange_strong seems to hang under GCC 13 on Ubuntu 23.04 pdimov at gmail dot com 2024-04-26 17:47 ` [Bug libstdc++/114865] " pdimov at gmail dot com 2024-04-26 19:40 ` pdimov at gmail dot com 2024-04-26 23:14 ` [Bug libstdc++/114865] [13/14/15 Regression] " pinskia at gcc dot gnu.org 2024-04-26 23:16 ` pinskia at gcc dot gnu.org 2024-04-27 0:13 ` pdimov at gmail dot com 2024-04-27 0:16 ` pinskia at gcc dot gnu.org 2024-04-27 0:16 ` pinskia at gcc dot gnu.org 2024-04-27 0:22 ` pinskia at gcc dot gnu.org 2024-04-27 0:25 ` pinskia at gcc dot gnu.org 2024-04-27 0:29 ` pdimov at gmail dot com 2024-04-27 0:31 ` pdimov at gmail dot com 2024-04-27 0:35 ` [Bug libstdc++/114865] [13/14/15 Regression] std::atomic<X>::compare_exchange_strong seems to hang under GCC 13 for C++11 pinskia at gcc dot gnu.org 2024-04-27 0:38 ` pdimov at gmail dot com [this message] 2024-04-27 0:42 ` pinskia at gcc dot gnu.org 2024-04-27 0:42 ` pdimov at gmail dot com 2024-05-02 11:40 ` redi at gcc dot gnu.org 2024-05-02 11:41 ` redi at gcc dot gnu.org 2024-05-02 11:44 ` redi at gcc dot gnu.org 2024-05-02 11:47 ` redi at gcc dot gnu.org 2024-05-02 11:55 ` redi at gcc dot gnu.org 2024-05-02 15:13 ` pdimov at gmail dot com 2024-05-21 9:20 ` jakub 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-114865-4-qrY97SK22k@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).