From 0c988f92dc47091498e4aad01a8505253c8e9111 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 10 Feb 2022 14:26:46 -0700 Subject: [PATCH] arm: Add static asssert for context size Add a static assert for the siginfo_t, mcontext_t and ucontext_t sizes. These are de-facto ABI options and cannot change size ever. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D34210 --- sys/arm/arm/exec_machdep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/arm/arm/exec_machdep.c b/sys/arm/arm/exec_machdep.c index 865fc4d8628..fdd57d7859c 100644 --- a/sys/arm/arm/exec_machdep.c +++ b/sys/arm/arm/exec_machdep.c @@ -69,6 +69,10 @@ __FBSDID("$FreeBSD$"); #include #include +_Static_assert(sizeof(mcontext_t) == 208, "mcontext_t size incorrect"); +_Static_assert(sizeof(ucontext_t) == 260, "ucontext_t size incorrect"); +_Static_assert(sizeof(siginfo_t) == 64, "siginfo_t size incorrect"); + /* * Clear registers on exec */