From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 99F243858D38 for ; Mon, 10 Apr 2023 23:52:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99F243858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pm1JS-0006zp-HM; Mon, 10 Apr 2023 19:52:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=7qwGERfpGi1jMVgfCxX/6Jo//ZnvtJFaMh4mDoiwIj4=; b=fbJRnsu9r7SIXr5z46vv 2pHlgzs3FMZ64r0tS1dgp0AnC5kEtXlkHzimQh2X1+WuKYaklCsx7f44Ztx5g7CRhy/ERQXYNwpFN KNW9/TSAD2mKQbUx8ZUU4ZBrIblHzeXWU/TqBFb3CEUwtbNwil2tAdicZKEBVKvlTLGaB0UZd1AMQ ybun66exkzhQBw7PZhGW7qPoV/PN/SLAjxltzms1F7blAkMOh0Smvew5ri5dZsThY4EbB1De01/yS NbwFYBQnTffQiyo/NOJXUmYrbZq+QKcuw27JXZ4K0K12wHJxxMtwFfPEhRhtdThk6GzHwFi18gjl5 aHM58TsQAY1uAw==; Received: from [2a01:cb19:4a:a400:de41:a9ff:fe47:ec49] (helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pm1JR-0004MO-M7; Mon, 10 Apr 2023 19:52:42 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pm1JP-001Lpb-1u; Tue, 11 Apr 2023 01:52:39 +0200 Date: Tue, 11 Apr 2023 01:52:39 +0200 From: Samuel Thibault To: =?utf-8?Q?Fl=C3=A1vio?= Cruz Cc: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org, Luca Subject: Re: [RFC PATCH gnumach 03/34] Make exception subcode a long Message-ID: <20230410235239.33qewzyohtwa2fbp@begin> Mail-Followup-To: =?utf-8?Q?Fl=C3=A1vio?= Cruz , Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org, Luca References: <20230319151017.531737-1-bugaevc@gmail.com> <20230319151017.531737-4-bugaevc@gmail.com> <20230402224557.3cmvy5ztbxr2n7fm@begin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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: Hello, Flávio Cruz, le mer. 05 avril 2023 22:11:38 -0400, a ecrit: > On Mon, Apr 3, 2023 at 5:32 AM Sergey Bugaev via Libc-alpha <[1] > libc-alpha@sourceware.org> wrote: > > On Mon, Apr 3, 2023 at 1:45 AM Samuel Thibault <[2]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 I have uploaded the fixes as debian packages, in addition to the commits upstream. Samuel