1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-05-13 15:13:36 +00:00

sigsegv: Port to CHERI.

* lib/sigsegv.c: Treat __aarch64__ like __arm64__.
(SIGSEGV_FOR_ALL_SIGNALS): Treat SIGPROT like SIGSEGV and SIGBUS.
This commit is contained in:
Bruno Haible
2023-11-10 01:16:55 +01:00
parent 2dd1a7984c
commit 31158ba641
2 changed files with 21 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2023-11-09 Bruno Haible <bruno@clisp.org>
sigsegv: Port to CHERI.
* lib/sigsegv.c: Treat __aarch64__ like __arm64__.
(SIGSEGV_FOR_ALL_SIGNALS): Treat SIGPROT like SIGSEGV and SIGBUS.
2023-11-09 Paul Eggert <eggert@cs.ucla.edu>
stdio: port better to older macOS

View File

@@ -430,7 +430,7 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
#if defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ /* GNU/kFreeBSD, FreeBSD */
# if defined __arm__ || defined __armhf__ || defined __arm64__
# if defined __arm__ || defined __armhf__ || (defined __arm64__ || defined __aarch64__)
# define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, siginfo_t *sip, void *ucp
# define SIGSEGV_FAULT_ADDRESS sip->si_addr
@@ -825,8 +825,20 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
|| defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ \
|| defined __NetBSD__ || defined __OpenBSD__ \
|| (defined __APPLE__ && defined __MACH__)
# define SIGSEGV_FOR_ALL_SIGNALS(var,body) \
{ int var; var = SIGSEGV; { body } var = SIGBUS; { body } }
# if defined __CHERI__
# define SIGSEGV_FOR_ALL_SIGNALS(var,body) \
{ int var; \
var = SIGSEGV; { body } \
var = SIGBUS; { body } \
var = SIGPROT; { body } \
}
# else
# define SIGSEGV_FOR_ALL_SIGNALS(var,body) \
{ int var; \
var = SIGSEGV; { body } \
var = SIGBUS; { body } \
}
# endif
#else
# define SIGSEGV_FOR_ALL_SIGNALS(var,body) \
{ int var; var = SIGSEGV; { body } }