Back to index

glibc  2.9
Functions
jmpbug.c File Reference
#include <stdio.h>
#include <setjmp.h>
#include <alloca.h>

Go to the source code of this file.

Functions

static void sub5 (jmp_buf buf)
static void test (int x)
int main (void)

Function Documentation

int main ( void  )

Definition at line 32 of file jmpbug.c.

{
  int i;

  for (i = 123; i < 345; ++i)
    test (i);

  return 0;
}
static void sub5 ( jmp_buf  buf) [static]

Definition at line 8 of file jmpbug.c.

{
  longjmp (buf, 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void test ( int  x) [static]

Definition at line 14 of file jmpbug.c.

{
  jmp_buf buf;
  char *foo;
  int arr[100];

  arr[77] = x;
  if (setjmp (buf))
    {
      printf ("made it ok; %d\n", arr[77]);
      return;
    }

  foo = (char *) alloca (128);
  sub5 (buf);
}

Here is the call graph for this function: