[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH gnumach 03/34] Make exception subcode a long

From: Flávio Cruz
Subject: Re: [RFC PATCH gnumach 03/34] Make exception subcode a long
Date: Wed, 5 Apr 2023 22:11:38 -0400


On Mon, Apr 3, 2023 at 5:32 AM Sergey Bugaev via Libc-alpha <libc-alpha@sourceware.org> wrote:
On Mon, Apr 3, 2023 at 1:45 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le dim. 19 mars 2023 18:09:46 +0300, a ecrit:
> > 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 requires matching changes in glibc and the Hurd.
> But the change doesn't affect 32bit glibc and hurd since
> rpc_long_integer_t is really like integer_t there, right?

It's supposed to be ABI-compatible on 32-bit, since all these types
are 32-bit integers there, yes. (But maybe I messed up, do check!)

But it may break source-level compatibility (if you only apply the
Mach change but not glibc, or vice versa); as in maybe GCC will
complain about int vs long in function prototype vs definition. I
haven't actually checked, since I have both changes applied locally.

It breaks compatibility for Hurd code:

hurd/mach-defpager/default_pager.c:3789:1: error: conflicting types for 'catch_exception_raise'; have 'kern_return_t(mach_port_t, mach_port_t, mach_port_t, int, int, int)' {aka 'int(unsigned int, unsigned int, unsigned int, int, int, int)'}
3789 | catch_exception_raise(mach_port_t exception_port,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/runner/_work/cross-hurd/cross-hurd/src/hurd/mach-defpager/default_pager.c:67:
./exc_S.h:19:15: note: previous declaration of 'catch_exception_raise' with type 'kern_return_t(mach_port_t, mach_port_t, mach_port_t, integer_t, integer_t, rpc_long_integer_t)' {aka 'int(unsigned int, unsigned int, unsigned int, int, int, long int)'}
19 | kern_return_t catch_exception_raise


reply via email to

[Prev in Thread] Current Thread [Next in Thread]