mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 17:53:37 +08:00
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.
This commit is contained in:
parent
6ca8284e7a
commit
f841c97e51
@ -1,3 +1,9 @@
|
||||
2018-09-27 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
[BZ #23717]
|
||||
* stdlib/tst-setcontext9.c (f1a): Make st2 static.
|
||||
(do_test): Make st1 static.
|
||||
|
||||
2018-09-26 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
[BZ #23707]
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user