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 50896385696A for ; Mon, 6 Nov 2023 22:30:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 50896385696A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 50896385696A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699309825; cv=none; b=sQKN6YHKTuxrHI4RPlAtN9jjfOZO3qj1m9JyoaS7JoVPm8hBWFPhwtwiR39x/TNS+qRo+qKjIWND5yXVPwOw+F09oZ80GlaefCVsQi5CvJW3LJiFM43NA9Z8njKHcBlScXzvhj+/F92HxkOdrRvRaEdOwFS8YxXfJaugOSVCbKE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699309825; c=relaxed/simple; bh=tMwS/MFVp/e0+Z8KatTqCwsmp3fKvMqx9rKnvlBOASU=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=pCQLCOJTC5V9cWBY0lUWE5k0RK2x526OKvCrw311+Q99quI1Uqbd9C7cCSbou0/rHdavu3evjkyZT7VJVJa0sIiveIfI7+FMC4kRe3h9QiJk0KScGQaJNvLaSbjndxFSdRKjgYYdoJ1phInsGuESfrOrsngsD/jxTetHa5RBQD4= ARC-Authentication-Results: i=1; server2.sourceware.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 1r086v-0002bu-08; Mon, 06 Nov 2023 17:30:22 -0500 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=IocywzqIN7R1QbxseCkC8cDXCLZeenpBWM696uqyhOc=; b=EY6PxWQcjppMabqsJJi6 3RvFsy3wTVbiQEUjGBASL3Ut6l4+XxfnZ/zIJk0iLskQSuQ5triGNAh6GZgbCWNJrrjSPkRorUZZk RSDpsU8Uuh01eX+kB8fhF5APrKJE42rZXiQ786YuSXyDu9WpneMRskaqZ+zV5ISkvWkS/7A1s80+D WuF5mksLeuD64IlXsXKvsnKyMb8oUL2N506lRdkEfPizZPYV5TN9XuxsWFhRlt5Hlkq1FVzJjlUVK W6U2TZ+KKt/SN6nuaBb6KcH6nwE8EDuAofwkfK/VcD3/NdYazore4ZEGZVEhRLOW4dBqBuDDjj5lT 8xgNpc4hj3IX0g==; Date: Mon, 6 Nov 2023 23:30:09 +0100 From: Samuel Thibault To: Flavio Cruz Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org Subject: Re: [PATCH glibc] Update BAD_TYPECHECK to work on x86_64 Message-ID: <20231106223009.i2xl5q6277dihdhc@begin> Mail-Followup-To: Flavio Cruz , bug-hurd@gnu.org, libc-alpha@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Applied, thanks! Flavio Cruz, le dim. 05 nov. 2023 23:13:32 -0500, a ecrit: > --- > sysdeps/mach/mach_rpc.h | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/sysdeps/mach/mach_rpc.h b/sysdeps/mach/mach_rpc.h > index 152f057ca7..ed81403be6 100644 > --- a/sysdeps/mach/mach_rpc.h > +++ b/sysdeps/mach/mach_rpc.h > @@ -20,11 +20,8 @@ > > /* Macro used by MIG to cleanly check the type. */ > #define BAD_TYPECHECK(type, check) __glibc_unlikely (({ \ > - union { mach_msg_type_t t; uint32_t w; } _t, _c; \ > + union { mach_msg_type_t t; uintptr_t w; } _t, _c; \ > _t.t = *(type); _c.t = *(check);_t.w != _c.w; })) > > -/* TODO: add this assertion for x86_64. */ > -#ifndef __x86_64__ > -_Static_assert (sizeof (uint32_t) == sizeof (mach_msg_type_t), > - "mach_msg_type_t needs to be the same size as uint32_t"); > -#endif > +_Static_assert (sizeof (uintptr_t) == sizeof (mach_msg_type_t), > + "mach_msg_type_t needs to be the same size as uintptr_t"); > -- > 2.39.2