mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
tst-longjmp_chk: add comments and convert to test-skeleton
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/* Basic test to make sure doing a longjmp to a jmpbuf with an invalid sp
|
||||
is caught by the fortification code. */
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
@@ -43,8 +45,8 @@ handler (int sig)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (void)
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = handler;
|
||||
@@ -84,3 +86,6 @@ main (void)
|
||||
puts ("second longjmp returned");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define TEST_FUNCTION do_test ()
|
||||
#include "../test-skeleton.c"
|
||||
|
||||
Reference in New Issue
Block a user