git: 0c988f92dc47 - main - arm: Add static asssert for context size
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Feb 2022 21:33:58 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c988f92dc47091498e4aad01a8505253c8e9111 commit 0c988f92dc47091498e4aad01a8505253c8e9111 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-02-10 21:26:46 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-02-10 21:32:20 +0000 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 865fc4d86288..fdd57d7859c5 100644 --- a/sys/arm/arm/exec_machdep.c +++ b/sys/arm/arm/exec_machdep.c @@ -69,6 +69,10 @@ __FBSDID("$FreeBSD$"); #include <vm/pmap.h> #include <vm/vm_map.h> +_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 */