elf: Ignore loader debug env vars for setuid
[glibc.git] / elf / tst-execstack-prog.c
blob1b34bb5597906868ae096472efecbfa38c9b2565
1 /* Test program for executable stacks in an executable itself. */
3 #include <dlfcn.h>
4 #include <stdio.h>
5 #include <string.h>
6 #include <unistd.h>
7 #include <error.h>
9 #include "tst-execstack-mod.c" /* This defines the `tryme' test function. */
11 static void deeper (void (*f) (void));
13 static int
14 do_test (void)
16 tryme ();
18 /* Test that growing the stack region gets new executable pages too. */
19 deeper (&tryme);
21 return 0;
24 static void
25 deeper (void (*f) (void))
27 char stack[1100 * 1024];
28 explicit_bzero (stack, sizeof stack);
29 (*f) ();
30 memfrob (stack, sizeof stack);
33 #include <support/test-driver.c>