From: Paul Eggert <eggert@cs.ucla.edu>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: stack bounds
Date: Tue, 22 Sep 2020 18:28:14 -0700 [thread overview]
Message-ID: <15167a35-1886-c134-b407-d28e925f1089@cs.ucla.edu> (raw)
In-Reply-To: <9706515.UWU6Ao1R83@omega>
On 9/22/20 5:58 PM, Bruno Haible wrote:
> It sounds what you want is a function that returns the stack bounds, in such a
> way that every recursion step in a recursive function call the code can ask
> "am I close to the stack bound? do I need to stop recursing?"
That shouldn't be necessary, except for functions where GCC can't prove that
their activation records are small (and these exceptions should be quite rare at
runtime).
I am thinking of some combination of gcc -fstack-check and/or
-fstack-clash-protection and/or related ideas (not that I've looked into all the
details). That is, I'm expecting help from the hardware, the kernel, and from
GCC. Stack-exhaustion checking should "just work". I realize it's a nontrivial ask.
next prev parent reply other threads:[~2020-09-23 1:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m2a6xnu1sv.fsf@meyering.net>
[not found] ` <075a970b-f6aa-d2bb-e007-609a711085b2@gmail.com>
[not found] ` <CA+8g5KGBjFfHzafN2WFH6az5bQR8f68B1J-ETVWEBXvuDUL5rA@mail.gmail.com>
[not found] ` <17a0fe42-3ac6-9209-6f60-cddb5467f263@gmail.com>
[not found] ` <994fd316-0420-4b94-a1de-fea7d891c4ac@gmail.com>
2020-09-18 22:16 ` new snapshot available: grep-3.4-almost.26-5419 Paul Eggert
2020-09-18 22:42 ` Bruce Dubbs
2020-09-18 23:24 ` libsigsegv on LinuxFromScratch Bruno Haible
2020-09-18 23:47 ` Bruce Dubbs
2020-09-19 8:06 ` Bruce Dubbs
2020-09-19 23:47 ` Bruno Haible
2020-09-20 1:16 ` Bruce Dubbs
2020-09-20 23:15 ` Paul Eggert
2020-09-23 0:58 ` stack bounds Bruno Haible
2020-09-23 1:28 ` Paul Eggert [this message]
2020-10-10 12:08 ` Bruno Haible
2020-10-10 20:10 ` Paul Eggert
2020-10-10 21:49 ` Bruno Haible
2020-10-11 18:49 ` Paul Eggert
2020-10-11 22:08 ` Bruno Haible
2020-10-11 22:56 ` Paul Eggert
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
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15167a35-1886-c134-b407-d28e925f1089@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=bruno@clisp.org \
--cc=bug-gnulib@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: 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).