GNU bug report logs -
#41817
28.0.50; defconst lacks a safety net
Previous Next
Reported by: Stephen Berman <stephen.berman <at> gmx.net>
Date: Thu, 11 Jun 2020 21:11:02 UTC
Severity: normal
Found in version 28.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#41817: 28.0.50; defconst lacks a safety net
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 41817 <at> debbugs.gnu.org.
--
41817: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41817
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> From: Stephen Berman <stephen.berman <at> 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 <at> 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.
[Message part 3 (message/rfc822, inline)]
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 <at> 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
This bug report was last modified 5 years and 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.