aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-12-29 22:19:45 +0000
committerMike Frysinger <vapier@gentoo.org>2014-02-08 06:58:23 -0500
commit10444e425e539ec12e42415756b0a874413ce94a (patch)
tree3b1fcdf865cd8bdcb0cf9b3e40ba27df01220732
parent1e805e8db596a4e09e33aeba94aad568a365d110 (diff)
downloadglibc-10444e425e539ec12e42415756b0a874413ce94a.tar
glibc-10444e425e539ec12e42415756b0a874413ce94a.tar.gz
glibc-10444e425e539ec12e42415756b0a874413ce94a.tar.bz2
glibc-10444e425e539ec12e42415756b0a874413ce94a.zip
tst-longjmp_chk: add comments and convert to test-skeleton
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--ChangeLog7
-rw-r--r--debug/tst-longjmp_chk.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index aefcb38eb1..4e0aab0125 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2014-02-08 Mike Frysinger <vapier@gentoo.org>
+ * debug/tst-longjmp_chk.c: Add header comment and include
+ ../test-skeleton.c.
+ (do_test): Mark static.
+ (TEST_FUNCTION): Define.
+
+2014-02-08 Mike Frysinger <vapier@gentoo.org>
+
* sysdeps/unix/sysv/linux/bits/in.h (IP_NODEFRAG): Define.
(IP_PMTUDISC_INTERFACE): Likewise.
(IP_MULTICAST_IF): Likewise.
diff --git a/debug/tst-longjmp_chk.c b/debug/tst-longjmp_chk.c
index 8892974cc7..dba1855f4a 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"