From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 16 17:59:21 2016 Received: (at submit) by debbugs.gnu.org; 16 Oct 2016 21:59:21 +0000 Received: from localhost ([127.0.0.1]:35722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvtSj-0005xR-95 for submit@debbugs.gnu.org; Sun, 16 Oct 2016 17:59:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvtSh-0005xF-Dk for submit@debbugs.gnu.org; Sun, 16 Oct 2016 17:59:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvtSb-0007f5-5X for submit@debbugs.gnu.org; Sun, 16 Oct 2016 17:59:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42819) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bvtSb-0007f1-2w for submit@debbugs.gnu.org; Sun, 16 Oct 2016 17:59:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvtSZ-0006E1-R1 for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 17:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvtSW-0007dy-P2 for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 17:59:11 -0400 Received: from aibo.runbox.com ([91.220.196.211]:49923) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bvtSW-0007dP-Hi for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 17:59:08 -0400 Received: from [10.9.9.213] (helo=mailfront13.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1bvtSP-0002Tk-Gk for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 23:59:01 +0200 Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=rainbow.local) by mailfront13.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1bvtSI-0000Pe-79 for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2016 23:58:54 +0200 From: Gemini Lasswell To: bug-gnu-emacs@gnu.org Subject: 26.0.50; edebug-max-depth should be customizable Date: Sun, 16 Oct 2016 14:58:44 -0700 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --=-=-= Content-Type: text/plain Edebug's recursion limit is currently 150, but this is not enough for the following files in the Emacs source tree: lisp/calc/calc-ext.el lisp/help-macro.el lisp/international/fontset.el The latter two can be successfully instrumented with edebug-max-depth set to 200, but the minimum value necessary for calc-ext.el is somewhere between 500 and 1000. All three of these files contain large quoted lists. I'm attaching a patch to accomplish this. I chose to mention max-lisp-eval-depth and max-specpdl-size in the defcustom docstring, but I also noticed that Edebug temporarily bumps max-lisp-eval-depth up by 800 while it's working. I could modify the patch to replace the 800 by something along the lines of (+ 200 (* max-edebug-depth 4)), if someone with more Emacs experience than me says it is a good idea. Edebug also increases max-specpdl-size (by 2000) so that probably would also need to be changed in the code. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-Change-edebug-max-depth-from-defconst-to-defcustom.patch >From 860deea4d3ff07c105435ac36c8477fcb6e1d008 Mon Sep 17 00:00:00 2001 From: gazally Date: Sun, 16 Oct 2016 13:34:56 -0700 Subject: [PATCH] Change edebug-max-depth from defconst to defcustom Make edebug-max-depth customizable to give Edebug the ability to instrument code containing very large quoted lists. * lisp/emacs-lisp/edebug.el (edebug-max-depth): Add defcustom. --- lisp/emacs-lisp/edebug.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 6918539..facbda8 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -112,6 +112,18 @@ edebug-eval-macro-args :type 'boolean :group 'edebug) +(defcustom edebug-max-depth 150 + "Maximum recursion depth when instrumenting code. +This limit stops recursion if an Edebug specification contains an +infinite loop. When Edebug is instrumenting code containing very +large quoted lists, it may reach this limit and give the error +message \"Too deep - perhaps infinite loop in spec?\" You can +safely make this limit considerably larger than its default +value, but you may also need to increase `max-lisp-eval-depth' +and `max-specpdl-size'." + :type 'integer + :group 'edebug) + (defcustom edebug-save-windows t "If non-nil, Edebug saves and restores the window configuration. That takes some time, so if your program does not care what happens to @@ -1452,7 +1464,6 @@ edebug-list-form (defvar edebug-after-dotted-spec nil) (defvar edebug-matching-depth 0) ;; initial value -(defconst edebug-max-depth 150) ;; maximum number of matching recursions. ;;; Failure to match -- 2.10.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 06:05:36 2017 Received: (at 24713-done) by debbugs.gnu.org; 4 Feb 2017 11:05:36 +0000 Received: from localhost ([127.0.0.1]:55523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZy9w-0007uN-4x for submit@debbugs.gnu.org; Sat, 04 Feb 2017 06:05:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZy9u-0007uA-8E for 24713-done@debbugs.gnu.org; Sat, 04 Feb 2017 06:05:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZy9k-0003hY-2i for 24713-done@debbugs.gnu.org; Sat, 04 Feb 2017 06:05:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47697) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZy9j-0003hU-W3; Sat, 04 Feb 2017 06:05:24 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1320 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cZy9j-000259-9X; Sat, 04 Feb 2017 06:05:23 -0500 Date: Sat, 04 Feb 2017 13:05:13 +0200 Message-Id: <83o9yi8bdi.fsf@gnu.org> From: Eli Zaretskii To: Gemini Lasswell In-reply-to: (message from Gemini Lasswell on Sun, 16 Oct 2016 14:58:44 -0700) Subject: Re: bug#24713: 26.0.50; edebug-max-depth should be customizable References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 24713-done Cc: 24713-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Gemini Lasswell > Date: Sun, 16 Oct 2016 14:58:44 -0700 > > Edebug's recursion limit is currently 150, but this is not enough for > the following files in the Emacs source tree: > > lisp/calc/calc-ext.el > lisp/help-macro.el > lisp/international/fontset.el > > The latter two can be successfully instrumented with edebug-max-depth > set to 200, but the minimum value necessary for calc-ext.el is somewhere > between 500 and 1000. All three of these files contain large quoted > lists. > > I'm attaching a patch to accomplish this. Thanks, pushed. A few minor nits for the future: . when you add/modify a defcustom, always specify a :version tag . please always mention the bug number in the commit log message, otherwise it must be added by hand, which is error-prone . user-visible changes should be accompanied by suitable changes to NEWS and the manuals (I did it this time) . please use the US English convention of leaving 2 spaces between sentences -- this is what we use in Emacs documentation . please configure your Git repo (on Github?) so that your user name is identical to what you use to send email, to avoid confusion From unknown Fri Aug 15 03:38:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Mar 2017 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator