From: Mike Frysinger Date: Sun, 29 Dec 2013 22:19:45 +0000 (+0000) Subject: tst-longjmp_chk: add comments and convert to test-skeleton X-Git-Tag: upstream/2.30~7900 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10444e425e539ec12e42415756b0a874413ce94a;p=external%2Fglibc.git tst-longjmp_chk: add comments and convert to test-skeleton Signed-off-by: Mike Frysinger --- diff --git a/ChangeLog b/ChangeLog index aefcb38..4e0aab0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2014-02-08 Mike Frysinger + * 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 + * 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 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 #include #include @@ -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"