* bug#41817: 28.0.50; defconst lacks a safety net
@ 2020-06-11 21:10 Stephen Berman
2020-06-20 8:07 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Berman @ 2020-06-11 21:10 UTC (permalink / raw)
To: 41817
0. emacs -Q
1. In *scratch* type: (defvar 'bla "bla") C-j
=> Debugger entered--Lisp error: (wrong-type-argument symbolp 'bla)
2. In *scratch* type: (defconst 'bla "bla") C-j
=> 🤯
Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
Finternal__define_uninitialized_variable (symbol=symbol@entry=0x14ee4f3,
doc=0x0) at /home/steve/src/emacs/emacs-master/src/lisp.h:1010
diff --git a/src/eval.c b/src/eval.c
index 959adea646..171d0644cc 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -831,6 +831,8 @@ DEFUN ("defconst", Fdefconst, Sdefconst, 2, UNEVALLED, 0,
Lisp_Object sym, tem;
sym = XCAR (args);
+ CHECK_SYMBOL (sym);
+
Lisp_Object docstring = Qnil;
if (!NILP (XCDR (XCDR (args))))
{
In GNU Emacs 28.0.50 (build 7, x86_64-pc-linux-gnu, GTK+ Version 3.24.17, cairo version 1.17.3)
of 2020-06-11 built on strobe-jhalfs
Repository revision: d8a6d2e4810a4072cabbf76170dc4bf708f27d10
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Linux From Scratch SVN-20200401
Configured using:
'configure 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'
Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD PDUMPER LCMS2 GMP
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#41817: 28.0.50; defconst lacks a safety net
2020-06-11 21:10 bug#41817: 28.0.50; defconst lacks a safety net Stephen Berman
@ 2020-06-20 8:07 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2020-06-20 8:07 UTC (permalink / raw)
To: Stephen Berman; +Cc: 41817-done
> From: Stephen Berman <stephen.berman@gmx.net>
> Date: Thu, 11 Jun 2020 23:10:07 +0200
>
> 0. emacs -Q
> 1. In *scratch* type: (defvar 'bla "bla") C-j
> => Debugger entered--Lisp error: (wrong-type-argument symbolp 'bla)
> 2. In *scratch* type: (defconst 'bla "bla") C-j
> => 🤯
> Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
> Finternal__define_uninitialized_variable (symbol=symbol@entry=0x14ee4f3,
> doc=0x0) at /home/steve/src/emacs/emacs-master/src/lisp.h:1010
>
> diff --git a/src/eval.c b/src/eval.c
> index 959adea646..171d0644cc 100644
> --- a/src/eval.c
> +++ b/src/eval.c
Thanks, installed on the emacs-27 branch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-20 8:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 21:10 bug#41817: 28.0.50; defconst lacks a safety net Stephen Berman
2020-06-20 8:07 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).