aboutsummaryrefslogtreecommitdiff
path: root/debug/tst-longjmp_chk.c
diff options
context:
space:
mode:
Diffstat (limited to 'debug/tst-longjmp_chk.c')
-rw-r--r--debug/tst-longjmp_chk.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/debug/tst-longjmp_chk.c b/debug/tst-longjmp_chk.c
index 8892974..dba1855 100644
--- a/debug/tst-longjmp_chk.c
+++ b/debug/tst-longjmp_chk.c
@@ -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"