From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by sourceware.org (Postfix) with ESMTPS id 958C93858C50 for ; Thu, 6 Apr 2023 02:11:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 958C93858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-x234.google.com with SMTP id l18so28076726oic.13 for ; Wed, 05 Apr 2023 19:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680747110; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wrmLk2OQ66J4ahhqokitpvEUIGRADn8sfRnFVjRDLUg=; b=FfkwGwcTvHuX2R9bN7xfS8OAlAPyN2TjDool7gx5qHnSxjZ0S89lnScQH0Y1Io71vH yCCoCqj2GvSRnqigugWobXWAqWKew6roOy4ODDBySExZ7LUMMIWpCHP/KtUVwLzmUHwQ MaHEoQQTHxafc7ojWKnA2I7BJB1b/v43VyghlPToq4pMjBpgUYcwtsqVIt/zpIs0wfc2 ZKTeuCcKHB+45R9RGeVMMCDTXicTAZ2i6nANzuyL2lHJzkomTLlidbJpjFz5ZsOHaEsB uaHqa1cbu+cyXrNEEXrZgK4YAwYEP2nLnbTPN32jXlyzTqrfpG2F0+KhCDMpqqcIBelO RZbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680747110; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wrmLk2OQ66J4ahhqokitpvEUIGRADn8sfRnFVjRDLUg=; b=gs7cSYe9bxEgi1O3QkLmryyXdl2Q2xHoJ6WSx+iylWjy4jjRjWGKkD+sgPsGy9aw3s 2FIXzew+eyiRqzkwLvJTqr4phi8woVRuwJaASP1JPzs8dA4CVzsMBJdaXQwVpX7UK0i3 5zfP2PX9ydLkqcQb6WLZDyveW/CMlAy+JJlMdQVXhcTU6Nu3cBsBoVwXxZsf1LVp1irZ k/C7z24F5/JJvK1N7oIPMg4s6iNtKAtWY0FD6leqoAeCb2ABo5dvWp+Hs/JabQhI0uN6 rzPVW1ULbY+SQMPVuMSBodxXIcQTZZ6Ac3BeaqGGb0OLKpx8U+MgJtqcIl707WIBEUso fKvg== X-Gm-Message-State: AAQBX9cDcsJrNySPKGt26vSVC7D3CqDHfDzT278txBa4sD8Zn8Le8kiT 6B+AJ9p097Vo6TG4LZeWZi79VsFd5GoS/OVTHFs9sEowCQ== X-Google-Smtp-Source: AKy350ZLmCbo7N3IxsJQvg3eoO/1hebzpSrsG0oOyZZH8U5fN/tw7EyqbF7SXYQJzo2RzaUcY4KJe7U9eMk+HofO9Og= X-Received: by 2002:a05:6808:298a:b0:378:74af:45ef with SMTP id ex10-20020a056808298a00b0037874af45efmr2343619oib.11.1680747109819; Wed, 05 Apr 2023 19:11:49 -0700 (PDT) MIME-Version: 1.0 References: <20230319151017.531737-1-bugaevc@gmail.com> <20230319151017.531737-4-bugaevc@gmail.com> <20230402224557.3cmvy5ztbxr2n7fm@begin> In-Reply-To: From: =?UTF-8?B?RmzDoXZpbyBDcnV6?= Date: Wed, 5 Apr 2023 22:11:38 -0400 Message-ID: Subject: Re: [RFC PATCH gnumach 03/34] Make exception subcode a long To: Sergey Bugaev Cc: Samuel Thibault , libc-alpha@sourceware.org, bug-hurd@gnu.org, Luca Content-Type: multipart/alternative; boundary="000000000000702a6d05f8a16e73" X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000702a6d05f8a16e73 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello! On Mon, Apr 3, 2023 at 5:32=E2=80=AFAM Sergey Bugaev via Libc-alpha < libc-alpha@sourceware.org> wrote: > On Mon, Apr 3, 2023 at 1:45=E2=80=AFAM Samuel Thibault > 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 in= to > > > 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_pag= er.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 > Sergey > --000000000000702a6d05f8a16e73--