1 /* Basic test to make sure doing a longjmp to a jmpbuf with an invalid sp
2 is caught by the fortification code. */
13 #include <support/support.h>
19 __attribute__ ((noinline
))
23 asm volatile ("" : "=m" (buf
));
27 puts ("second longjmp succeeded");
33 static bool expected_to_fail
;
43 static const char msg
[] = "unexpected longjmp failure\n";
44 TEMP_FAILURE_RETRY (write (STDOUT_FILENO
, msg
, sizeof (msg
) - 1));
53 set_fortify_handler (handler
);
56 expected_to_fail
= false;
62 printf ("first longjmp returned\n");
67 expected_to_fail
= true;
72 puts ("second longjmp returned");
76 #include <support/test-driver.c>