From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: When calling defuns is a Bad Thing. Date: Mon, 22 Oct 2018 11:25:43 -0400 Message-ID: References: <20181021164110.GA4664@ACM> <20181022140638.GA4585@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1540221906 32191 195.159.176.226 (22 Oct 2018 15:25:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2018 15:25:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 22 17:25:02 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEc4j-0008Gm-OP for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2018 17:25:01 +0200 Original-Received: from localhost ([::1]:35758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEc6o-0003LT-M3 for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2018 11:27:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEc5W-0002l3-CP for emacs-devel@gnu.org; Mon, 22 Oct 2018 11:25:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEc5S-0004AA-A7 for emacs-devel@gnu.org; Mon, 22 Oct 2018 11:25:50 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:46800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEc5S-00048A-4N for emacs-devel@gnu.org; Mon, 22 Oct 2018 11:25:46 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w9MFPhp8031310; Mon, 22 Oct 2018 11:25:43 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 4ACF96A487; Mon, 22 Oct 2018 11:25:43 -0400 (EDT) In-Reply-To: <20181022140638.GA4585@ACM> (Alan Mackenzie's message of "Mon, 22 Oct 2018 14:06:38 +0000") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6401=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6401> : inlines <6936> : streams <1802057> : uri <2735663> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230560 Archived-At: > So, I now agree with your initial assessment, there's probably nothing > much to worry about here, but I intend to explore further, and see if I > can crash/hang Emacs by using edebug. IIRC normally the way things work is that the instrumentation code checks `edebug-active` to see if we're "running normal code" or "running Edebug's own code", so that when you instrument code that's used by Edebug it behaves as instrumented when "called from outside" but not when "called from Edebug". > One thing that could be done is to put a `no-edebug' property on symbols > whose function mustn't be instrumented (such as edebug-slow-after), but > that seems somewhat excessive, unless we find a real problem. Indeed. I just tried edebugging edebug-slow-after and I got a "variable binding depth exceeds ..." error. Not completely sure why it breaks in this particular way, but at least it doesn't inf-loop. I think we could improve the code so more of Edebug can be edebugged (e.g. I get the impression that Edebugging edebug--update-coverage will break whereas it should be possible to edebug it), but it's probably not worth spending the time until someone actually bumps into the need. Stefan