public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "keno at juliacomputing dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/105708] libgcc: aarch64: init_lse_atomics can race with user-defined constructors Date: Tue, 24 May 2022 00:22:38 +0000 [thread overview] Message-ID: <bug-105708-4-veNUWv4gtj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105708-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105708 --- Comment #5 from Keno Fischer <keno at juliacomputing dot com> --- Yes, rr cannot record ll/sc. I'm happy to go into depth here, but this is not really an aarch64 issue. rr doesn't work on ppc64le either for this reason. The introduction of lse has made rr feasible on aarch64, and there has been a substantial effort to get to this point where rr is working on the architecture. We're now working through the distribution issues, where this cropped up (as mentioned, we didn't notice earlier, because the initialization is not deterministic). For the moment, we're telling downstream users to avoid manual use of ll/sc in programs that they want to record under rr. Obviously this is a significant effort, but for many people it's worth it, because rr is a critical tool. Perhaps in future hardware iterations, we'll get the ability to fault on stxr abort or similar, which would allow rr to support ll/sc, but until then we need to make due with what we have. The issue here is that `-moutline-atomics` now introduces extra ll/sc instructions even in software where the implementer was careful to avoid manual uses of ll/sc and in particular also in system libraries like libc and rtld that the user may have little control over. Of course we can keep telling people to build their distribution images with `-march=armv8.3-a -mno-outline-atomics` and avoid this issue or have them patch libgcc downstream, but that really seems to defeat the point of `-moutline-atomics`, which was exactly to avoid this kind of split.
next prev parent reply other threads:[~2022-05-24 0:22 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-23 23:46 [Bug libgcc/105708] New: " keno at juliacomputing dot com 2022-05-23 23:57 ` [Bug libgcc/105708] " pinskia at gcc dot gnu.org 2022-05-24 0:00 ` pinskia at gcc dot gnu.org 2022-05-24 0:03 ` keno at juliacomputing dot com 2022-05-24 0:08 ` pinskia at gcc dot gnu.org 2022-05-24 0:22 ` keno at juliacomputing dot com [this message] 2022-05-24 0:27 ` pinskia at gcc dot gnu.org 2022-05-24 0:47 ` keno at juliacomputing dot com 2022-05-24 0:50 ` pinskia at gcc dot gnu.org 2022-05-24 6:22 ` roc at ocallahan dot org 2022-05-24 10:00 ` wilco at gcc dot gnu.org 2022-05-24 10:21 ` jakub at gcc dot gnu.org 2022-05-24 11:15 ` wilco at gcc dot gnu.org 2022-05-24 13:56 ` wilco at gcc dot gnu.org 2022-05-25 14:54 ` cvs-commit at gcc dot gnu.org 2022-10-24 21:41 ` pinskia 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-105708-4-veNUWv4gtj@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).