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 #62 received at 62009 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Philip Kaludercic <philipk <at> posteo.net>, michael_heerdegen <at> web.de,
 Daniel Mendler <mail <at> daniel-mendler.de>, monnier <at> iro.umontreal.ca,
 62009 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#62009: 29.0.60; Emacs crashes on setf symbol-name
Date: Fri, 10 Mar 2023 11:57:43 +0000
>
> diff --git a/src/lisp.h b/src/lisp.h
> index 1276285e2f2..80bbb047824 100644
> --- a/src/lisp.h
> +++ b/src/lisp.h
> @@ -1685,6 +1685,8 @@ SREF (Lisp_Object string, ptrdiff_t index)
> INLINE void
> SSET (Lisp_Object string, ptrdiff_t index, unsigned char new)
> {
> +  if (XSTRING (string)->u.s.size_byte == -2)
> +    Fsignal (Qsetting_constant, string);
>   SDATA (string)[index] = new;
> }
> INLINE ptrdiff_t
>

That flag is useful only for the first part of the bug: setting the symbol 
name of a function defined in C.  It does not prevent changing symbol 
names in general, e.g. (aset (symbol-name 'find-file) 1 ?o).





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

Previous Next


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