diff options
author | Andreas Schwab <schwab@suse.de> | 2018-09-27 12:37:06 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2018-09-27 12:37:06 +0200 |
commit | 3a67c72c1512f778304a5644dea2fcf5bdece274 (patch) | |
tree | 818e7df62c1373e52c134de2e4eae85d6710fca3 /stdlib | |
parent | 2339d6a55eb7a7e040ae888e906adc49eeb59eab (diff) | |
download | glibc-3a67c72c1512f778304a5644dea2fcf5bdece274.tar.gz glibc-3a67c72c1512f778304a5644dea2fcf5bdece274.tar.xz glibc-3a67c72c1512f778304a5644dea2fcf5bdece274.zip |
Fix stack overflow in tst-setcontext9 (bug 23717)
The function f1a, executed on a stack of size 32k, allocates an object of size 32k on the stack. Make the stack variables static to reduce excessive stack usage. (cherry picked from commit f841c97e515a1673485a2b12b3c280073d737890)
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/tst-setcontext9.c | 4 |
1 files 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) { |