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

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Gregory Heytings <gregory <at> heytings.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: michael_heerdegen <at> web.de, Philip Kaludercic <philipk <at> posteo.net>,
 Augusto Stoffel <arstoffel <at> gmail.com>, 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 11:31:22 +0100
On 3/10/23 10:40, Gregory Heytings wrote:
> Instead of raising a signal, I suggest:
> 
> diff --git a/src/data.c b/src/data.c
> index 0f1d881e00b..76867d6787e 100644
> --- a/src/data.c
> +++ b/src/data.c
> @@ -780,7 +780,7 @@ DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 
> 1, 0,
> 
>     CHECK_SYMBOL (symbol);
>     name = SYMBOL_NAME (symbol);
> -  return name;
> +  return build_string (SSDATA (name));
>   }
> 
>   DEFUN ("bare-symbol", Fbare_symbol, Sbare_symbol, 1, 1, 0,

Creating a string is not a good idea since it will lead to an
unacceptably large performance overhead. Raising an exception upon
modification would be the best approach.

Daniel




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.