1
2
3
4
5
6
7
8
9
10#include <signal.h>
11#include <ucontext.h>
12
13#include "test_signals_utils.h"
14#include "testcases.h"
15
16struct fake_sigframe sf;
17
18static int fake_sigreturn_misaligned_run(struct tdescr *td,
19 siginfo_t *si, ucontext_t *uc)
20{
21
22 if (!get_current_context(td, &sf.uc))
23 return 1;
24
25
26 fake_sigreturn(&sf, sizeof(sf), 3);
27
28 return 1;
29}
30
31struct tdescr tde = {
32 .name = "FAKE_SIGRETURN_MISALIGNED_SP",
33 .descr = "Triggers a sigreturn with a misaligned sigframe",
34 .sig_ok = SIGSEGV,
35 .timeout = 3,
36 .run = fake_sigreturn_misaligned_run,
37};
38