From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: scratch/igc 3f46110b878: Fix an eassert Date: Wed, 11 Dec 2024 16:40:28 +0100 Message-ID: References: <173392893159.259533.15506246926795870751@vcs3.savannah.gnu.org> <20241211145532.114DD65A960@vcs3.savannah.gnu.org> <8734iul0j5.fsf@protonmail.com> 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="22007"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org, Gerd =?utf-8?Q?M=EF=BF=BDllmann?= To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 11 16:41:17 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 1tLOpw-0005Vt-RL for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Dec 2024 16:41:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLOpK-0000kf-7O; Wed, 11 Dec 2024 10:40:38 -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 1tLOpG-0000jO-6Q for emacs-devel@gnu.org; Wed, 11 Dec 2024 10:40:34 -0500 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLOpE-0001wB-H0; Wed, 11 Dec 2024 10:40:33 -0500 Original-Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-385ed7f6605so3114520f8f.3; Wed, 11 Dec 2024 07:40:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733931630; x=1734536430; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cFMiciguJr9NiPxMfAYhJQ/0yOivEGiruOJQOaCVcPA=; b=QAI/TwHfBEw4IQ8TLo225Rd+IjZeE8ZUucFVHCoIFk6qcilGn4ZBHZ7TQ/PUmi4i0h JF1gdruTMqxpIrK+0ujY8VPVhlS9R5EIdg97ed4yuXGUIWxw3LJLjAVufpM412LoPhAE 281Ul7G+2L2/fQwiwxWzcJ1WXv9EKmINtbkwSmAOQs6AozQtYO+zg0w2hkI7xWxIqCyf UUoZGXfe1iNTAjDBthEWy1ORZITpitKdCEOmJ7IKOx59SVDMmzQf5DRqjKc3nLL3jNBw dEcYh/+vbL2r9O2POGYcF5hqFA/f6zqUVd12ZWinbDNQn4XseOLDtkFarxh/TQyLY6r9 pH7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733931630; x=1734536430; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cFMiciguJr9NiPxMfAYhJQ/0yOivEGiruOJQOaCVcPA=; b=GyFzvgkY2MdpD9SNfRHFyvG+3Y8b1hhtt3qnl3Busak9GmTWYpNq9exyFCYzBCroqF LMWhGRit8X8tcgFvFWxa+tVBHlcD+YB/XiW+QxMmlI1VjCyAKOlSYaUFSohHvl5FFw20 uOwmmu8xZWyMbYVRVjK56l4dvnr16atLmjZBa09QAgnD6V0sE9uKxfvJmWS5m9rtCdxV qjARyosRdI6s3b1kP2VzcxP3OCm2odk5Oqmudzh16r/AwThSelFaLGrZliejT/f5zxdY o7QB/F2ZqUjEJp1gulMOKDKAzgKnU7EPtd1VhGD7lFsRccGmsOIsbgrLgSJxqAIYfhH3 jAeg== X-Forwarded-Encrypted: i=1; AJvYcCWVa4Jx9iZXmhUdiJ8+L5U0QwoMlmLVQpX7iPwUkgZgbJ/BBDfN25VzzxK3Mmbgn8gRd1km@gnu.org X-Gm-Message-State: AOJu0YzgK5/8xwegSc4mlf3Xg3kESv3Uaei4UVxk8TNaNBSmgXVe1iP7 eBGST3HLLylW4WQU5Jc749xEag0ReYcmqi/swyDPk5L+AdArCjMMTU/Mqw== X-Gm-Gg: ASbGncs5lWdKnDzOUuJ4Mh74h8LPSHypSR63/LAjw5NX9C7DXEa6+gdyusNJVvcXjAo 5RIcFlHLRZhTQmFnLU3652bWmtkNuZD7A4Da/g/loZ71O8+fGSyf1gBw9CgOGHNQeEO2kW7dit/ abfAZ97fEIq7jpXvSzukCbrtQ3mLUUZ6fH0H1OWelR8pPueV3AP4VdiSbM00WeX5I9bLdSjZvwU uSZYCFb2t3Z1ojstQ3w8Mqv+l37j1urgfaYwrYrm8MTTbi9JN65/XdMZ5K7Y0OFT/GWP50OcezM HdMC/jWnbO76ZKCCeBkZUHLIwtkLMwS08bIv50JMR5YSPxd72xh+Fn8CZ4GpILU= X-Google-Smtp-Source: AGHT+IEr+KC6KJeF7+9m1Z022FRIR9gE9G1yLhgRFTCz2+0Wo3jJ77bdLcY2degoae0V2Jr5GLDzkw== X-Received: by 2002:a05:6000:490e:b0:385:ed16:c91 with SMTP id ffacd0b85a97d-3864ce5f97amr2705622f8f.24.1733931630112; Wed, 11 Dec 2024 07:40:30 -0800 (PST) Original-Received: from pro2 (p200300e0b709ba00c5d5596d9959c8a7.dip0.t-ipconnect.de. [2003:e0:b709:ba00:c5d5:596d:9959:c8a7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3878248f734sm1569267f8f.5.2024.12.11.07.40.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 07:40:29 -0800 (PST) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann=22'?= =?utf-8?Q?s?= message of "Wed, 11 Dec 2024 16:36:02 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=gerd.moellmann@gmail.com; helo=mail-wr1-x436.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:326358 Archived-At: Gerd M=C3=B6llmann writes: > Pip Cet writes: > >> "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, struc= t Lisp_Weak_Hash_Table_Weak_Par >>> for (ssize_t i =3D 0; i < limit; i++) >>> { >>> if (w->entries[i].intptr & 1) >>> - eassert ((mps_word_t)w->entries[i].intptr ^ w->entries[i].intpt= r =3D=3D 0); >>> + eassert ((mps_word_t)w->entries[i].intptr ^ (w->entries[i].intp= tr =3D=3D 0)); >>> bool was_nil =3D (w->entries[i].intptr) =3D=3D 0; >>> 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? > > It was a warning from clang. So the right thing would be (x ^ y) =3D=3D 0? So thi sone? odified src/igc.c @@ -2278,7 +2278,7 @@ fix_weak_hash_table_weak_part (mps_ss_t ss, struct Li= sp_Weak_Hash_Table_Weak_Par for (ssize_t i =3D 0; i < limit; i++) { if (w->entries[i].intptr & 1) - eassert ((mps_word_t)w->entries[i].intptr ^ (w->entries[i].intptr = =3D=3D 0)); + eassert (((mps_word_t)w->entries[i].intptr ^ w->entries[i].intptr) = =3D=3D 0); bool was_nil =3D (w->entries[i].intptr) =3D=3D 0; intptr_t off =3D 0; #ifdef WORDS_BIGENDIAN