GNU bug report logs - #41817
28.0.50; defconst lacks a safety net

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41817 in the body.
You can then email your comments to 41817 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41817; Package emacs. (Thu, 11 Jun 2020 21:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 11 Jun 2020 21:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; defconst lacks a safety 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
@@ -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




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 20 Jun 2020 08:08:02 GMT) Full text and rfc822 format available.

Notification sent to Stephen Berman <stephen.berman <at> gmx.net>:
bug acknowledged by developer. (Sat, 20 Jun 2020 08:08:02 GMT) Full text and rfc822 format available.

Message #10 received at 41817-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 41817-done <at> debbugs.gnu.org
Subject: Re: bug#41817: 28.0.50; defconst lacks a safety net
Date: Sat, 20 Jun 2020 11:07:15 +0300
> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Jul 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.