[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH glibc 04/34] hurd: Make exception subcode a long
From: |
Sergey Bugaev |
Subject: |
[RFC PATCH glibc 04/34] hurd: Make exception subcode a long |
Date: |
Sun, 19 Mar 2023 18:09:47 +0300 |
On EXC_BAD_ACCESS, exception subcode is used to pass the faulting memory
address, so it needs to be (at least) pointer-sized. Thus, make it into
a long. This matches the corresponding change in GNU Mach.
---
hurd/catch-exc.c | 2 +-
hurd/hurd/signal.h | 5 +++--
hurd/hurdfault.c | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/hurd/catch-exc.c b/hurd/catch-exc.c
index e8a9c798..5ee2233a 100644
--- a/hurd/catch-exc.c
+++ b/hurd/catch-exc.c
@@ -31,7 +31,7 @@ _S_catch_exception_raise (mach_port_t port,
mach_msg_type_number_t codeCnt
#else /* Vanilla Mach 3.0 interface. */
integer_t exception,
- integer_t code, integer_t subcode
+ integer_t code, long_integer_t subcode
#endif
)
{
diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
index 4e9f79b1..c33f974b 100644
--- a/hurd/hurd/signal.h
+++ b/hurd/hurd/signal.h
@@ -51,9 +51,10 @@ struct hurd_signal_preemptor; /* <hurd/sigpreempt.h>
*/
struct hurd_signal_detail
{
/* Codes from origination Mach exception_raise message. */
- integer_t exc, exc_code, exc_subcode;
+ integer_t exc, exc_code;
+ long_integer_t exc_subcode;
/* Sigcode as passed or computed from exception codes. */
- integer_t code;
+ long_integer_t code;
/* Error code as passed or extracted from exception codes. */
error_t error;
};
diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c
index 069c1c26..a81e7280 100644
--- a/hurd/hurdfault.c
+++ b/hurd/hurdfault.c
@@ -45,7 +45,7 @@ _hurdsig_fault_catch_exception_raise (mach_port_t port,
mach_msg_type_number_t codeCnt
#else /* Vanilla Mach 3.0 interface. */
integer_t exception,
- integer_t code, integer_t subcode
+ integer_t code, long_integer_t subcode
#endif
)
{
--
2.39.2
- [RFC PATCH 00/34] The rest of the x86_64-gnu port, Sergey Bugaev, 2023/03/19
- [RFC PATCH gnumach 01/34] Add i386_fsgs_base_state, Sergey Bugaev, 2023/03/19
- [RFC PATCH gnumach 02/34] Remove bootstrap.defs, Sergey Bugaev, 2023/03/19
- [RFC PATCH gnumach 03/34] Make exception subcode a long, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 04/34] hurd: Make exception subcode a long,
Sergey Bugaev <=
- [RFC PATCH glibc 05/34] hurd: Remove __hurd_threadvar_stack_{offset, mask}, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 09/34] hurd: Fix _hurd_setup_sighandler () signature, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 06/34] hurd: Swap around two function calls, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 07/34] hurd: Fix file name in #error, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 13/34] x86-64: Disable prefer_map_32bit_exec tunable on non-Linux, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 14/34] hurd: Move rtld-strncpy-c.c out of mach/hurd/, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 15/34] hurd: Use uintptr_t for register values in trampoline.c, Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 10/34] stdio-common: Fix building when !IS_IN (libc), Sergey Bugaev, 2023/03/19
- [RFC PATCH glibc 11/34] mach, hurd: Drop __libc_lock_self0, Sergey Bugaev, 2023/03/19