diff --git a/ChangeLog b/ChangeLog index aefcb38eb1..4e0aab0125 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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. 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 #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"