GNU bug report logs - #62009
29.0.60; Emacs crashes on setf symbol-name

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Mon, 6 Mar 2023 19:28:01 UTC

Severity: normal

Found in version 29.0.60

Full log


Message #56 received at 62009 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: michael_heerdegen <at> web.de, mail <at> daniel-mendler.de, philipk <at> posteo.net,
 monnier <at> iro.umontreal.ca, 62009 <at> debbugs.gnu.org
Subject: Re: bug#62009: 29.0.60; Emacs crashes on setf symbol-name
Date: Fri, 10 Mar 2023 13:50:24 +0200
> From: Augusto Stoffel <arstoffel <at> gmail.com>
> Cc: Philip Kaludercic <philipk <at> posteo.net>,  michael_heerdegen <at> web.de,
>   mail <at> daniel-mendler.de,  monnier <at> iro.umontreal.ca,  62009 <at> debbugs.gnu.org
> Date: Fri, 10 Mar 2023 09:47:33 +0100
> 
> On Fri, 10 Mar 2023 at 09:45, Augusto Stoffel wrote:
> 
> > On Fri, 10 Mar 2023 at 09:11, Eli Zaretskii wrote:
> >
> >>> Is it not possible to detect this before the illegal memory access, and
> >>> raise a signal in Emacs Lisp?
> >>
> >> It won't be easy, if at all possible.  And I'm not sure we even want
> >> to do that.  What would be the purpose of supporting such a use of
> >> Emacs?
> >
> > What is the purpose of supporting mutation of symbol names in general?
> >
> >   (aset (symbol-name 'find-file) 1 ?o)
> >   (fboundp 'find-file)
> >   => nil
> >
> > This one doesn't crash Emacs, but wreaks havoc, maybe in even worse
> > ways.
> 
> (To clarify, I think this of course should raise a signal.)

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.




This bug report was last modified 2 years and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.