From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#46722: test-map-into fails Date: Wed, 05 Jan 2022 13:24:40 -0500 Message-ID: References: <871r2yu8b1.fsf@gnus.org> <87czl7w4fh.fsf@dick> <87a6gawabq.fsf@dick> <83a6ga9hu1.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27817"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: rgm@gnu.org, stefan@marxist.se, contovob@tcd.ie, dick.r.chiang@gmail.com, 46722@debbugs.gnu.org, larsi@gnus.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 05 19:25:24 2022 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 1n5AyR-00071z-Im for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jan 2022 19:25:23 +0100 Original-Received: from localhost ([::1]:58944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5AyQ-0008Jy-Fr for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jan 2022 13:25:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5Ay6-0008Jb-PS for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 13:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5Ay6-0007So-Fm for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 13:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n5Ay6-0007wM-8W for bug-gnu-emacs@gnu.org; Wed, 05 Jan 2022 13:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jan 2022 18:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46722 X-GNU-PR-Package: emacs Original-Received: via spool by 46722-submit@debbugs.gnu.org id=B46722.164140709030501 (code B ref 46722); Wed, 05 Jan 2022 18:25:02 +0000 Original-Received: (at 46722) by debbugs.gnu.org; 5 Jan 2022 18:24:50 +0000 Original-Received: from localhost ([127.0.0.1]:41742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5Axu-0007vt-3q for submit@debbugs.gnu.org; Wed, 05 Jan 2022 13:24:50 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5Axs-0007vg-I1 for 46722@debbugs.gnu.org; Wed, 05 Jan 2022 13:24:48 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9B1BE441D2C; Wed, 5 Jan 2022 13:24:42 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 42813441D29; Wed, 5 Jan 2022 13:24:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1641407081; bh=eIeCQbBLJXOIIENAZTd0ZZuLROGUMPJOGHntLbJeVlE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=i+QeR9zfnG53kxh4Cg7QHDWK7rEOiSaYZYo0CaIVAZHkqvgUorCxdM1RtIh6RuOUb 14nvHbkOoAgyyh9Lm9usBuiTh+qEkPx+XcVmLyMM2XFxmHDNsDnDhaHaewe+jzIvAd bL/FfwNNUc6wiK637B+e4Vv3ZopmvD7WNq8WSeoD15nwL3I42uAeYpOK2gNYRMbdqh 4Y7BDWDP9+OUybR0eqw9xtgllA8q/W44cGkpz6yA1G5FiRif05e2jJHqYPfyaBRteP IQbrz62vV+Z8YVCX9fwBoA2vj4n9LRF5NtCPXiG7T1Mn3yPxjB3mMUsLwF/kYxKoGY PmD/4JHf6WUJA== Original-Received: from ceviche (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 02AD81201B2; Wed, 5 Jan 2022 13:24:40 -0500 (EST) In-Reply-To: <83a6ga9hu1.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 05 Jan 2022 20:07:50 +0200") 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" Xref: news.gmane.io gmane.emacs.bugs:223707 Archived-At: > Is it? how so? copy-sequence is not a trivial operation, at least not > with arbitrary data structures. This is used on the `key` argument of `gethash/puthash` on a hash-table defined to use `:test #'equal`. And it is used on a value which is defined to be a list. For this reason, I think it is very safe. The reason why the current code only misfires "rarely" is that in most cases, when we change by side-effect an object that's a key in an `equal` hashtable, the result is a hashtable where this entry can't be found (because its hash doesn't match any more), so we end up luckily not making use of this (now broken) entry. So the underlying bug only appears if either the hash-table is rehashed or the new `sxhash-equal` value happens to the same as the old one. > And we nowadays use generics a lot, so this could potentially affect > gobs of code. So I'd rather we didn't install this on the > release branch. Fine by me, Stefan