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:55:17 +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="6587"; 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:55:33 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 1tLP3l-0001T4-6B for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Dec 2024 16:55:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLP3b-0003ze-Ey; Wed, 11 Dec 2024 10:55:23 -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 1tLP3a-0003wn-72 for emacs-devel@gnu.org; Wed, 11 Dec 2024 10:55:22 -0500 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLP3Y-0004Cn-Lq; Wed, 11 Dec 2024 10:55:21 -0500 Original-Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-434f3d934fcso25025215e9.3; Wed, 11 Dec 2024 07:55:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733932518; x=1734537318; 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=7hnDvbLww5bHMXmgh1/a181MAAPjoUUja+VXc/YXkdk=; b=FvAF+eRQn/UI5K9zQ9Kws0ojndw0J1C8O7OWDmiqd880h+p3rQiKYI4thx3sVBFQT+ 3gwMjmDE2QRzCKfFyuuflubfBjnRiTxREneY/7EgEbOG0uAqrHvGwxfLjjRVlyC84K4J 4U/+PgFaPyeC7Paqslg/gvs4+Om7585nQJwHTMV5Kb09zu4bBfnztcc4AvPG7v9pGDET 3UZn0HDBcDelr+DvXRGRZw2VJnyeEbBYPAoa2+xJcKjQZC4TbEAa6EYW8Nz60igCgFw/ b4nXMy70hxkqsNbV32i3ffiSUBdqJv3ZP597HDHZbxhW3nETy+PKnJVV1BqXO5EYoq9/ semA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733932518; x=1734537318; 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=7hnDvbLww5bHMXmgh1/a181MAAPjoUUja+VXc/YXkdk=; b=NsZbg6WEkE+p5u94nbvKQ0CKTOhetvEXS63/GM69urxnFiiduhYrtZZc+g7RK9NDZM Hkfvc9I3tGyvBEHeXMQF9pxuPuGAHvGDtkSIr8ORqi6h+07HtQqW5xITTgck/sj37Rm6 4CRyjEWYruf8dCJVpaaaSTBh+yIUsB38bdmYj1yVvfaRS8XftC9EZ2Q6BAHqvywIJqUi eDeCvuL/loj4qkLJDM3jTl8Ib5eeNPbUJwO3ciq/1NhvrG7sKOvloVx2FjhC7HOSjk3k E03eRxRzGbbLZQFnEfbKQWfhPKZ7qwKel3e3WcqPLCnJo6VYGxbtJKMrQIC7Pt0UGXm0 /v4w== X-Forwarded-Encrypted: i=1; AJvYcCWDr/o044Kw/LM/F28ISBr4kVB0LlUP6HoQfw9EJL2+DaZ1N1bEvFX+fu6oHixjHUcmXUBB@gnu.org X-Gm-Message-State: AOJu0Yw56RFrSKawJhI2Bl7zfAuqd583SmFxt3t2eaehLTXAzQ/h/Phn iY1eLbLMXaU7r9pHTEOQ8YExjn6XlNeTROXIOUTrq2ZwG4KqQE83SI0h5Q== X-Gm-Gg: ASbGnct5Jnun67ndQWA33rATYVXYk9eswg5CSYJyzxQagbctQtYex9rXR/fI7SvB2PU +ZLREOz3b8K9f6Cq6WXncHIz2qKKUToDchZ2GU+iLHgz/oPxJJbVWpQFgvIqwF+u3tX4WHPqFP6 bfautMvB9bOAhUhV6GMClORZsgHu2yNgsUiDvENJv1YlBDRm/RjDLoUahpU3+gfqRJub7Q+H1RX SvLYg3UQ9RUK4IaxfBSs6VKHCV4TsXw3weaYQgEwhH6U3q/LqwhukPbZ8uALII88+MeArBDp5jp 4rJ+JcqVWqXi12KDvR/TkAmEMjELG88oA30x/3PsnTTKNDFZdIGkQCzVt1MceDg= X-Google-Smtp-Source: AGHT+IHMCK+qb6S0icaREBb+lqkmNHQbqK9QiGj4mX//NZPnHxFHSdJDGfeq7SE6PaT9FnDW/3ZNgw== X-Received: by 2002:a05:600c:5122:b0:42c:c401:6d8b with SMTP id 5b1f17b1804b1-4361c38d8edmr25403445e9.7.1733932518229; Wed, 11 Dec 2024 07:55:18 -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 5b1f17b1804b1-436204aa209sm12927225e9.24.2024.12.11.07.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 07:55:17 -0800 (PST) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann=22'?= =?utf-8?Q?s?= message of "Wed, 11 Dec 2024 16:40:28 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x32c.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:326366 Archived-At: Gerd M=C3=B6llmann writes: > 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, stru= ct 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].intp= tr =3D=3D 0); >>>> + eassert ((mps_word_t)w->entries[i].intptr ^ (w->entries[i].int= ptr =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 = 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].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 Please ignore, this was already fixed, I didn't see it.