1 /* Test that the stack correctly dies after a setcontext(2) call. */
8 static volatile int *sp
;
10 static void sighandler(int sig
, siginfo_t
*sip
, void *arg
)
12 ucontext_t
*ucp
= (ucontext_t
*) arg
;
13 sp
= (int *) &ucp
->uc_mcontext
.gregs
[0];
19 /* Always-null value that is used to prevent any possible compiler
21 volatile int zero
= 0;
23 /* Setup a signal handler. */
24 sa
.sa_sigaction
= sighandler
;
25 sa
.sa_flags
= SA_SIGINFO
;
26 if (sigfillset(&sa
.sa_mask
)) {
30 if (sigaction(SIGUSR1
, &sa
, NULL
)) {
38 /* Value pointed by sp should be at this point uninitialized. */