From: Paul Eggert <eggert@cs.ucla.edu>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Bruno Haible <bruno@clisp.org>,
Florian Weimer <fweimer@redhat.com>,
libc-alpha@sourceware.org
Subject: Re: [PATCH 3/3] Misc: Add <sys/cstack.h> and the cstack_* family of functions
Date: Mon, 24 May 2021 16:41:57 -0700 [thread overview]
Message-ID: <ed06de94-4221-e1ff-7809-8989ef82f109@cs.ucla.edu> (raw)
In-Reply-To: <146fa4f0-ea19-fdc4-a05c-74008bb4ab5f@linaro.org>
On 5/24/21 12:11 PM, Adhemerval Zanella via Libc-alpha wrote:
> If this is really a requirement, I think the best options would be to add
> an extra flag to opt-in.
Opt-in works for me. Although the GNU apps I help maintain typically
don't have nested functions, nested functions are a longstanding GNU C
feature and are a good thing to have when you need them.
Part of the issue here (in case this isn't clear) is that we might want
to have a Gnulib version (or even just a copy) of cstack_* to help port
GNU apps to other platforms. On these other platforms, mmap might not be
the right way to make a stack executable (or might not be needed). I
imagine that it'd be better to have this implementation detail done by
the cstack_* implementation, than to have each nested-function-using app
port this detail by hand.
> The cstack_t is basically another heap object and I think it should be
> handled as such.
I hope that "handled as such" doesn't mean "the user must always
manually free it". That is, even if the cstack_t object is on the heap,
surely it'd be more convenient for cstack_* users if the object's
storage is automatically reclaimed when a thread exits and the object is
no longer needed.
next prev parent reply other threads:[~2021-05-24 23:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 14:58 Bruno Haible
2021-05-24 15:28 ` Bruno Haible
2021-05-25 7:42 ` Florian Weimer
2021-05-24 19:11 ` Adhemerval Zanella
2021-05-24 23:41 ` Paul Eggert [this message]
2021-05-25 7:40 ` Florian Weimer
2021-05-25 12:17 ` Adhemerval Zanella
2021-05-25 12:23 ` Florian Weimer
2021-05-25 12:25 ` Adhemerval Zanella
2021-05-25 12:29 ` Adhemerval Zanella
2021-05-25 8:41 ` Florian Weimer
-- strict thread matches above, loose matches on Subject: below --
2021-05-20 12:11 [PATCH 0/3] Convenience function for allocating (alternate signal) stacks Florian Weimer
2021-05-20 12:13 ` [PATCH 3/3] Misc: Add <sys/cstack.h> and the cstack_* family of functions Florian Weimer
2021-05-20 12:21 ` Florian Weimer
2021-05-20 12:50 ` Andreas Schwab
2021-05-20 13:14 ` Florian Weimer
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=ed06de94-4221-e1ff-7809-8989ef82f109@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=adhemerval.zanella@linaro.org \
--cc=bruno@clisp.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.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: link
Be 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).