projects
/
kopensolaris-gnu
/
glibc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Tue Mar 12 04:57:57 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
[kopensolaris-gnu/glibc.git]
/
setjmp
/
jmpbug.c
1
/* setjmp vs alloca test case. Exercised bug on sparc. */
2
3
#include <stdio.h>
4
#include <setjmp.h>
5
#include <alloca.h>
6
7
void
8
sub5 (jmp_buf buf)
9
{
10
longjmp (buf, 1);
11
}
12
13
int
14
main (void)
15
{
16
jmp_buf buf;
17
char *foo;
18
int arr[100];
19
20
arr[77] = 76;
21
if (setjmp (buf))
22
{
23
printf ("made it ok; %d\n", arr[77]);
24
exit (0);
25
}
26
27
foo = (char *) alloca (128);
28
sub5 (buf);
29
30
/* NOTREACHED */
31
return 1;
32
}