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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#41817: closed (28.0.50; defconst lacks a safety net)
Date: Sat, 20 Jun 2020 08:08:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 20 Jun 2020 11:07:15 +0300
with message-id <83ftaqw47g.fsf <at> gnu.org>
and subject line Re: bug#41817: 28.0.50; defconst lacks a safety net
has caused the debbugs.gnu.org bug report #41817,
regarding 28.0.50; defconst lacks a safety net
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> 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>
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


[Message part 3 (message/rfc822, inline)]
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.


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

Previous Next


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