1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

Tue Mar 12 04:57:57 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>

* setjmp/Makefile (tests): Add jmpbug.
	* setjmp/jmpbug.c: New file.
This commit is contained in:
Roland McGrath
1996-03-12 10:01:41 +00:00
parent 1177c8babf
commit 6c46dada59
6 changed files with 53 additions and 11 deletions

32
setjmp/jmpbug.c Normal file
View File

@@ -0,0 +1,32 @@
/* setjmp vs alloca test case. Exercised bug on sparc. */
#include <stdio.h>
#include <setjmp.h>
#include <alloca.h>
void
sub5 (jmp_buf buf)
{
longjmp (buf, 1);
}
int
main (void)
{
jmp_buf buf;
char *foo;
int arr[100];
arr[77] = 76;
if (setjmp (buf))
{
printf ("made it ok; %d\n", arr[77]);
exit (0);
}
foo = (char *) alloca (128);
sub5 (buf);
/* NOTREACHED */
return 1;
}