From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: scratch/igc 3f46110b878: Fix an eassert Date: Wed, 11 Dec 2024 15:09:47 +0000 Message-ID: <8734iul0j5.fsf@protonmail.com> References: <173392893159.259533.15506246926795870751@vcs3.savannah.gnu.org> <20241211145532.114DD65A960@vcs3.savannah.gnu.org> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12590"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Gerd_M=EF=BF=BDllmann?= To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 11 16:48:32 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tLOwx-00034m-M4 for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Dec 2024 16:48:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLOvi-0003N0-0A; Wed, 11 Dec 2024 10:47:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLOLa-00062L-BH for emacs-devel@gnu.org; Wed, 11 Dec 2024 10:09:54 -0500 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLOLY-0006f8-7L; Wed, 11 Dec 2024 10:09:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1733929788; x=1734188988; bh=HoLhePzD70gZFIM1ECoPUHrQU5jCBlMB6ASas+OvXNg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=xTtWj6sHmWNgzRt0k2BN7dkDZAMwwYNhCHVbWnpOtcBX4V0kpFF1pO31q+3oy7XB1 24w3nxU2oEiu0HaK2743C/u/eTODiuxTFqwq+i3eU/p8yeNZUWAMF3+ESMtGlrrHNv av5tDlibdBDpm3c0xIiWqceQEbNBptQ2VEWDp3l22lEROdk+tP3xshxa6RIitMVzQ/ iDeAKXmhOEyVM6UiwrKy/ZTQPAcgdfFewrjKI0pYPG9Lde0mnxFOdqJYx4DqZLJ4l8 PM7a3hyjyi7SraBUatYPLnDQG1GeIaog3tdC0KZ30mFpfefTrWjfhTpe14mr5EpgC1 YqiTXDmHfRvVQ== In-Reply-To: <20241211145532.114DD65A960@vcs3.savannah.gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 2df8d78ad527ea926e36a67e3e377f880265db4f Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 11 Dec 2024 10:47:09 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326364 Archived-At: "Gerd Moellmann" writes: > branch: scratch/igc > commit 3f46110b878ef0940ad7c0a9eacd6ef441baad7d > Author: Gerd M=C3=B6llmann > Commit: Gerd M=C3=B6llmann > > Fix an eassert > --- > src/igc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/igc.c b/src/igc.c > index b1ef6939b5f..2ce508e055e 100644 > --- a/src/igc.c > +++ b/src/igc.c > @@ -2223,7 +2223,7 @@ fix_weak_hash_table_weak_part (mps_ss_t ss, struct = Lisp_Weak_Hash_Table_Weak_Par > =09for (ssize_t i =3D 0; i < limit; i++) > =09 { > =09 if (w->entries[i].intptr & 1) > -=09 eassert ((mps_word_t)w->entries[i].intptr ^ w->entries[i].intpt= r =3D=3D 0); > +=09 eassert ((mps_word_t)w->entries[i].intptr ^ (w->entries[i].intp= tr =3D=3D 0)); > =09 bool was_nil =3D (w->entries[i].intptr) =3D=3D 0; > =09 intptr_t off =3D 0; > #ifdef WORDS_BIGENDIAN I'm guessing I'm failing a basic C knowledge test here, but can you explain? Did you run into an assertion error with the old code, or a compiler warning? The intended assertion was that if the .intptr component is truncated to mps_word_t size, no information is lost, because I saw some problems with "negative" 32-bit addresses filling the MSB 32 bits of the Lisp_Objects with ones (the sign extension/zero extension problem, in other words). That would lead to the "splatted" Lisp_Object reading as 0xffffffff00000000, which caused trouble. So on i386, the assertion could also be written as (w->entries[i].intptr & 0xffffffff00000000) =3D=3D 0 I think the "fixed" assertion is trivially true? Pip