public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Carlos O'Donell <carlos@redhat.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	 GNU C Library <libc-alpha@sourceware.org>,
	 "H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] Fix tst-setcontext9 for optimized small stacks.
Date: Thu, 27 Sep 2018 09:16:00 -0000	[thread overview]
Message-ID: <mvm5zyr8fm6.fsf@suse.de> (raw)
In-Reply-To: <321d3408-dfec-50f9-fdc6-7962b184d8b8@redhat.com> (Carlos O'Donell's message of "Wed, 26 Sep 2018 20:10:37 -0400")

On Sep 26 2018, Carlos O'Donell <carlos@redhat.com> wrote:

> Does it run out of stack?

Definitely.

Andreas.

	[BZ #23717]
	* stdlib/tst-setcontext9.c (f1a): Make st2 static.
	(do_test): Make st1 static.
---
 stdlib/tst-setcontext9.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stdlib/tst-setcontext9.c b/stdlib/tst-setcontext9.c
index db8355766c..009928235d 100644
--- a/stdlib/tst-setcontext9.c
+++ b/stdlib/tst-setcontext9.c
@@ -58,7 +58,7 @@ f1b (void)
 static void
 f1a (void)
 {
-  char st2[32768];
+  static char st2[32768];
   puts ("start f1a");
   if (getcontext (&ctx[2]) != 0)
     {
@@ -93,7 +93,7 @@ f1a (void)
 static int
 do_test (void)
 {
-  char st1[32768];
+  static char st1[32768];
   puts ("making contexts");
   if (getcontext (&ctx[0]) != 0)
     {
-- 
2.19.0


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

  parent reply	other threads:[~2018-09-27  9:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18 14:31 Carlos O'Donell
2018-09-18 14:56 ` H.J. Lu
2018-09-26 22:26 ` Florian Weimer
2018-09-27  0:10   ` Carlos O'Donell
2018-09-27  4:57     ` Florian Weimer
2018-09-27  9:16     ` Andreas Schwab [this message]
2018-09-27 10:06       ` Florian Weimer
2018-09-27 18:26       ` Carlos O'Donell

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=mvm5zyr8fm6.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=carlos@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.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).