From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#62009: 29.0.60; Emacs crashes on setf symbol-name Date: Fri, 10 Mar 2023 13:00:34 +0100 Message-ID: References: <87o7p5of4n.fsf@daniel-mendler.de> <871qm01s6n.fsf@web.de> <9fcf05e8-506c-6566-e214-2ecf3194b85e@daniel-mendler.de> <83bkl45ul4.fsf@gnu.org> <87v8j9zl3i.fsf@posteo.net> <83a60l13p2.fsf@gnu.org> <87ilf9571k.fsf@gmail.com> <87edpx56xm.fsf@gmail.com> <83wn3ozuyn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37794"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, michael_heerdegen@web.de, Robert Pluim , monnier@iro.umontreal.ca, 62009@debbugs.gnu.org, Augusto Stoffel To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 10 13:01:13 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 1pabQv-0009eh-Hd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Mar 2023 13:01:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pabQm-0004J8-Ob; Fri, 10 Mar 2023 07:01:04 -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 1pabQk-0004Hj-Lp for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 07:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pabQk-0000su-Cz for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 07:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pabQk-0005HG-2p for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 07:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Mar 2023 12:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62009 X-GNU-PR-Package: emacs Original-Received: via spool by 62009-submit@debbugs.gnu.org id=B62009.167844964620248 (code B ref 62009); Fri, 10 Mar 2023 12:01:02 +0000 Original-Received: (at 62009) by debbugs.gnu.org; 10 Mar 2023 12:00:46 +0000 Original-Received: from localhost ([127.0.0.1]:53916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pabQT-0005GV-KO for submit@debbugs.gnu.org; Fri, 10 Mar 2023 07:00:45 -0500 Original-Received: from server.qxqx.de ([178.63.65.180]:49465 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pabQQ-0005GD-Sz for 62009@debbugs.gnu.org; Fri, 10 Mar 2023 07:00:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Mk+E0wiRRNAzd3G290ADo1Z4FbXBwp1p3zDiR/nKCZo=; b=FtBlrWS8GM5fnNbpgyScipkJVu H3UUreG4Iwf46OHfpgprWL4X7rdjs3nRYJYPsguGiAFqDmbdMtafyqAMidDDFA6KnCVYJGXOiUr9w Psrx8WspHbanM0VPYuxQUwpP1ccKF3jB8B45g+B2De9T8qOgHjeYicqiLxFLVUYSf76k=; Content-Language: en-US In-Reply-To: <83wn3ozuyn.fsf@gnu.org> 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:257683 Archived-At: On 3/10/23 12:50, Eli Zaretskii wrote: > Why bother? Emacs is not in the business of preventing Lisp > programmers from shooting themselves in the foot, certainly not when > that incurs runtime overhead, even a small one. Of course Elisp is in the business of preventing programmers from shooting themselves in the foot, otherwise we would extend Emacs in C. It is not only that Elisp is easier to write thanks to macros and other conveniences, but also because it is safer! I fully agree with you that we should not introduce a performance regression, in particular not one which increases GC pressure badly. Furthermore I agree that this is a minor bug which only occurs as an edge case when some specific strings are mutated. However the cost of fixing this bug is minor, since Elisp already supports read-only data stuctures as pointed out by Robert. We may only need an additional check in aset which won't introduce significant costs thanks to the branch predictor of CPUs. As Augusto pointed out, aset on strings can already be very costly because the string must be reallocated. In comparison, the additional check will be free. Daniel