Subject: Re: bug#62009: 29.0.60; Emacs crashes on setf symbol-name

From: Eli Zaretskii <[email-masked]>
Date: Fri, 10 Mar 2023 14:12:25 +0200

> From: Robert Pluim <[email-masked]>
> Cc: Gregory Heytings <[email-masked]>,  Philip Kaludercic
>  <[email-masked]>,  [email-masked],
>   [email-masked],  [email-masked],  Eli Zaretskii
>  <[email-masked]>,  Augusto Stoffel <[email-masked]>
> Date: Fri, 10 Mar 2023 12:30:48 +0100
> 
> 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);

"Setting constant" is misleading.

And again, why do that at all?  It's a waste of cycles, incurred on
_everyone_, for an extremely rare use case that is explicitly
discouraged.  We are not the TSA, and should not adopt their policy of
punishing the innocent 99.99% on behalf of a handful of villains.