From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65051: internal_equal manipulates symbols with position without checking symbols-with-pos-enabled. Date: Fri, 04 Aug 2023 17:32:35 +0300 Message-ID: <83leeqvpx8.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17794"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65051@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 04 16:33:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qRvri-0004Pk-VC for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Aug 2023 16:33:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRvrU-0000X9-Er; Fri, 04 Aug 2023 10:33:04 -0400 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 1qRvrS-0000Rt-Ce for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:33:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qRvrS-0003Ci-4P for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qRvrR-0000yi-LV for bug-gnu-emacs@gnu.org; Fri, 04 Aug 2023 10:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Aug 2023 14:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65051 X-GNU-PR-Package: emacs Original-Received: via spool by 65051-submit@debbugs.gnu.org id=B65051.16911595533705 (code B ref 65051); Fri, 04 Aug 2023 14:33:01 +0000 Original-Received: (at 65051) by debbugs.gnu.org; 4 Aug 2023 14:32:33 +0000 Original-Received: from localhost ([127.0.0.1]:54490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRvqz-0000xh-41 for submit@debbugs.gnu.org; Fri, 04 Aug 2023 10:32:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRvqx-0000xS-CY for 65051@debbugs.gnu.org; Fri, 04 Aug 2023 10:32:32 -0400 Original-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 1qRvqp-00030X-N3; Fri, 04 Aug 2023 10:32:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Etyh553D4TJPRbFzmBKwJYLZBsTRzmpagoBFvtJ8UKc=; b=L/8jthU6ujvL DaP/LeVBFZjdd63CWo+TynbzFtwScICrPh5yULrSG1x6Lh47Okj3zchbfSjx5SKoh9zvHTbVvcTsu 3pMxJw29qckMGYT9Tc3JW4RayVQjHxMWPEtbHiMUsJ+Xubv5yAch6y6oRSDqxBOxiUG7Jr+59dfCp Cu8KPmYrlcgjoggFSZ7NEr3BUDlYu3TImC1/x88RkT3cQRyALMy+jmBKJFGM/pqdRs73+WeNW4Il6 O0eACxDbEP8Dlv3mZVYbZvnkPq1cpcL/yIyxUnYxWtBho9sjC9le+ns1RnCx1fX7vcNQsMtTxm56c WI1ToARVd2UmDPs6BI0lmg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRvqp-0007b5-6t; Fri, 04 Aug 2023 10:32:23 -0400 In-Reply-To: (message from Alan Mackenzie on Fri, 4 Aug 2023 14:00:29 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266680 Archived-At: > Date: Fri, 4 Aug 2023 14:00:29 +0000 > From: Alan Mackenzie > > Hello, Emacs. > > The code in question is in internal_equal (src/fns.c) ~37 lines from its > start. We have: > > if (SYMBOL_WITH_POS_P (o1)) > o1 = SYMBOL_WITH_POS_SYM (o1); > if (SYMBOL_WITH_POS_P (o2)) > o2 = SYMBOL_WITH_POS_SYM (o2); > > at the top level of the function. Thus > > (equal 'foo #) > > will return non-nil, regardless of the setting of > symbols-with-pos-enabled. It should return non-nil only when that flag > variable is non-nil. This is a bug. > > ######################################################################### > > A simple fix is: What will happen to the comparison in internal_equal when symbols_with_pos_enabled is zero and the two objects have different positions, or one has a position, the other doesn't? And which branch are you proposing this change for?