public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "eggert at gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug other/100735] New: -fno-trampolines doc wrongly implies it affects C, C++ etc. Date: Mon, 24 May 2021 02:22:54 +0000 [thread overview] Message-ID: <bug-100735-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100735 Bug ID: 100735 Summary: -fno-trampolines doc wrongly implies it affects C, C++ etc. Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: eggert at gnu dot org Target Milestone: --- Created attachment 50859 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50859&action=edit doc patch for -fno-trampolines confusion The GCC manual's documentation of -fno-trampolines was apparently written from an Ada point of view. However, when I read it I understandably mistook it to say that -fno-trampolines also works for C, C++, etc. It doesn't: it is silently ignored for these languages, and I assume for any language other than Ada. This confusion caused me to go in the wrong direction in a Gnulib dicussion, as I mistakenly thought that entire C apps with nested functions could be compiled with -fno-trampolines and then use nested C function in stack overflow handlers where the alternate stack is allocated via malloc. I was wrong, as this won't work on common platforms like x86-64 where malloc yields non-executable storage. A proposed fix for the GCC manual is attached.
next reply other threads:[~2021-05-24 2:22 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-24 2:22 eggert at gnu dot org [this message] 2021-05-24 10:24 ` [Bug other/100735] " bruno at clisp dot org 2021-05-25 7:34 ` rguenth at gcc dot gnu.org 2021-05-25 7:42 ` ebotcazou at gcc dot gnu.org 2021-06-09 16:28 ` cvs-commit at gcc dot gnu.org 2021-06-09 18:15 ` law at gcc dot gnu.org 2021-06-09 18:58 ` cvs-commit 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-100735-4@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).