GNU bug report logs - #23651
25.1.50; edebug-read-sexp: infinite recursion when reading backquote or comma

Previous Next

Package: emacs;

Reported by: ju.schmidt <at> gmx.de

Date: Sun, 29 May 2016 23:00:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.1.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

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 23651 in the body.
You can then email your comments to 23651 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#23651; Package emacs. (Sun, 29 May 2016 23:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ju.schmidt <at> gmx.de:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 29 May 2016 23:00:03 GMT) Full text and rfc822 format available.

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

From: ju.schmidt <at> gmx.de
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50; edebug-read-sexp: infinite recursion when reading
 backquote or comma
Date: Sun, 29 May 2016 20:09:41 +0200
Start emacs with -Q, do M-: and type "(require 'edebug)". Then write
this in buffer "*scratch*":

`1

Then do M-: and type "(edebug-eval-defun)". It will give this error:

"edebug-read-sexp: Lisp nesting exceeds `max-lisp-eval-depth'"

(The documentation for edebug-eval-defun says that this should display
"1" instead of giving an error).

One gets the same error when the buffer contains this instead:

,1

This is caused by an endless recursion in edebug-read-sexp which
apparently can be fixed like this:

diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index c283c16..4254862 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -722,9 +722,9 @@ edebug-read-sexp
      ((eq class 'string) (read (current-buffer)))
      ((eq class 'quote) (forward-char 1)
       (list 'quote (edebug-read-sexp)))
-     ((eq class 'backquote)
+     ((eq class 'backquote) (forward-char 1)
       (list '\` (edebug-read-sexp)))
-     ((eq class 'comma)
+     ((eq class 'comma) (forward-char 1)
       (list '\, (edebug-read-sexp)))
      (t ; anything else, just read it.
       (read (current-buffer))))))

Configured using:
 'configure --prefix=/home/jhs/local --with-xpm=no --with-gif=no
 --with-tiff=no PKG_CONFIG_PATH=/home/jhs/local/lib/pkgconfig'

Configured features:
JPEG PNG SOUND DBUS GSETTINGS NOTIFY LIBXML2 FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort map mail-extr emacsbug message puny seq byte-opt gv
bytecomp byte-compile cl-extra help-mode cconv cl-loaddefs pcase cl-lib
dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils term/xterm xterm time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 98461 8207)
 (symbols 48 20696 0)
 (miscs 40 33 93)
 (strings 32 17428 3931)
 (string-bytes 1 532970)
 (vectors 16 11481)
 (vector-slots 8 395373 4073)
 (floats 8 185 220)
 (intervals 56 207 0)
 (buffers 976 11)
 (heap 1024 33354 1491))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23651; Package emacs. (Sat, 25 Mar 2017 18:40:02 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: ju.schmidt <at> gmx.de
Cc: 23651 <at> debbugs.gnu.org
Subject: Re: bug#23651: 25.1.50;
 edebug-read-sexp: infinite recursion when reading backquote or comma
Date: Sat, 25 Mar 2017 14:40:31 -0400
tags 23651 fixed
close 23651 26.1
quit

ju.schmidt <at> gmx.de writes:

> Start emacs with -Q, do M-: and type "(require 'edebug)". Then write
> this in buffer "*scratch*":
>
> `1
>
> Then do M-: and type "(edebug-eval-defun)". It will give this error:
>
> "edebug-read-sexp: Lisp nesting exceeds `max-lisp-eval-depth'"
>
> (The documentation for edebug-eval-defun says that this should display
> "1" instead of giving an error).
>
> One gets the same error when the buffer contains this instead:
>
> ,1
>
> This is caused by an endless recursion in edebug-read-sexp which
> apparently can be fixed like this:

Pushed to master [1: 5f6ef7cba8].

1: 2017-03-25 14:38:29 -0400 5f6ef7cba8200d19198e42a9a76fef1618b5f233
  Stop edebug getting stuck on backquote (Bug#23651)




Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 25 Mar 2017 18:40:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 23651 <at> debbugs.gnu.org and ju.schmidt <at> gmx.de Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 25 Mar 2017 18:40:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 23 Apr 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 62 days ago.

Previous Next


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