all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: When calling defuns is a Bad Thing.
Date: Mon, 22 Oct 2018 11:25:43 -0400	[thread overview]
Message-ID: <jwv4ldeqame.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20181022140638.GA4585@ACM> (Alan Mackenzie's message of "Mon, 22 Oct 2018 14:06:38 +0000")

> 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



      reply	other threads:[~2018-10-22 15:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-21 16:41 When calling defuns is a Bad Thing Alan Mackenzie
2018-10-21 18:07 ` Stefan Monnier
2018-10-22 14:06   ` Alan Mackenzie
2018-10-22 15:25     ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4ldeqame.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.