[PATCH] Fix tst-setcontext9 for optimized small stacks.
Carlos O'Donell
carlos@redhat.com
Thu Sep 27 18:26:00 GMT 2018
On 9/27/18 5:16 AM, Andreas Schwab wrote:
> On Sep 26 2018, Carlos O'Donell <carlos@redhat.com> wrote:
>
>> Does it run out of stack?
>
> Definitely.
Thanks for fixing this. I was a dummy.
> 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)
> {
>
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list