|
From: | Gregory Heytings |
Subject: | 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).
[Prev in Thread] | Current Thread | [Next in Thread] |