Back to index

glibc  2.9
Defines | Functions
tst-execstack-needed.c File Reference
#include <dlfcn.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <error.h>
#include "../test-skeleton.c"

Go to the source code of this file.

Defines

#define TEST_FUNCTION   do_test ()

Functions

void tryme (void)
static void deeper (void(*f)(void))
static int do_test (void)

Define Documentation

#define TEST_FUNCTION   do_test ()

Definition at line 35 of file tst-execstack-needed.c.


Function Documentation

static void deeper ( void(*)(void)  f) [static]

Definition at line 26 of file tst-execstack-needed.c.

{
  char stack[1100 * 1024];
  memfrob (stack, sizeof stack);
  (*f) ();
  memfrob (stack, sizeof stack);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int do_test ( void  ) [static]

Definition at line 15 of file tst-execstack-needed.c.

{
  tryme ();

  /* Test that growing the stack region gets new executable pages too.  */
  deeper (&tryme);

  return 0;
}

Here is the call graph for this function:

void tryme ( void  )

Definition at line 13 of file tst-execstack-mod.c.

{
  bool ok = false;
  void callback (void) { ok = true; }

  callme (&callback);

  if (ok)
    printf ("DSO called ok (local %p, trampoline %p)\n", &ok, &callback);
  else
    abort ();
}

Here is the call graph for this function:

Here is the caller graph for this function: