From: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
To: libc-alpha@sourceware.org
Subject: [PATCH] support: Replace MINSIGSTKSZ with sysconf (_SC_MINSIGSTKSZ)
Date: Fri, 9 Jul 2021 14:38:31 -0700 [thread overview]
Message-ID: <20210709213831.1477694-1-hjl.tools@gmail.com> (raw)
Replace MINSIGSTKSZ with sysconf (_SC_MINSIGSTKSZ) since the constant
MINSIGSTKSZ used in glibc build may be too small.
---
support/support_stack_alloc.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/support/support_stack_alloc.c b/support/support_stack_alloc.c
index 03494dd185..b05ae08968 100644
--- a/support/support_stack_alloc.c
+++ b/support/support_stack_alloc.c
@@ -39,10 +39,11 @@ support_stack_alloc (size_t size)
if (pagesize == -1)
FAIL_EXIT1 ("sysconf (_SC_PAGESIZE): %m\n");
- /* Always supply at least MINSIGSTKSZ space; passing 0 as size means
- only that much space. No matter what the number is, round it up
- to a whole number of pages. */
- size_t stacksize = roundup (size + MINSIGSTKSZ, pagesize);
+ /* Always supply at least sysconf (_SC_MINSIGSTKSZ) space; passing 0
+ as size means only that much space. No matter what the number is,
+ round it up to a whole number of pages. */
+ size_t stacksize = roundup (size + sysconf (_SC_MINSIGSTKSZ),
+ pagesize);
/* The guard bands need to be large enough to intercept offset
accesses from a stack address that might otherwise hit another
--
2.31.1
next reply other threads:[~2021-07-09 21:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 21:38 H.J. Lu via Libc-alpha [this message]
2021-07-09 22:10 ` [PATCH] support: Replace MINSIGSTKSZ with sysconf (_SC_MINSIGSTKSZ) Carlos O'Donell via Libc-alpha
2021-07-10 18:10 ` [PATCH] support: Replace _SC_MINSIGSTKSZ with _SC_SIGSTKSZ H.J. Lu via Libc-alpha
2021-07-11 14:44 ` Carlos O'Donell via Libc-alpha
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://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210709213831.1477694-1-hjl.tools@gmail.com \
--to=libc-alpha@sourceware.org \
--cc=hjl.tools@gmail.com \
/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).