[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When calling defuns is a Bad Thing.

From: Stefan Monnier
Subject: Re: When calling defuns is a Bad Thing.
Date: Mon, 22 Oct 2018 11:25:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]