repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Don't use NULL in last s_fma{,f} change
[glibc.git]
/
setjmp
/
jmpbug.c
blob
125977b2f719dbeb5743c5133d144802d4b35cb7
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
static void
8
sub5
(
jmp_buf
buf
)
9
{
10
longjmp
(
buf
,
1
);
11
}
12
13
static void
14
test
(
int
x
)
15
{
16
jmp_buf
buf
;
17
char
*
foo
;
18
int
arr
[
100
];
19
20
arr
[
77
] =
x
;
21
if
(
setjmp
(
buf
))
22
{
23
printf
(
"made it ok; %d
\n
"
,
arr
[
77
]);
24
return
;
25
}
26
27
foo
= (
char
*)
alloca
(
128
);
28
sub5
(
buf
);
29
}
30
31
int
32
main
(
void
)
33
{
34
int
i
;
35
36
for
(
i
=
123
;
i
<
345
; ++
i
)
37
test
(
i
);
38
39
return
0
;
40
}