unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Should I report Emacs crashes due to ELisp infinite recursion?
@ 2016-08-01 13:11 Clément Pit--Claudel
  2016-08-01 13:56 ` Eli Zaretskii
  2016-08-02 14:24 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Clément Pit--Claudel @ 2016-08-01 13:11 UTC (permalink / raw)
  To: Emacs developers


[-- Attachment #1.1: Type: text/plain, Size: 201 bytes --]

Hi emacs-dev,

Suppose I manage to crash Emacs from ELisp, due to an infinite loop. Should I report it as a bug? Or is it expected that infinite recursion from ELisp can crash Emacs?

Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Should I report Emacs crashes due to ELisp infinite recursion?
  2016-08-01 13:11 Should I report Emacs crashes due to ELisp infinite recursion? Clément Pit--Claudel
@ 2016-08-01 13:56 ` Eli Zaretskii
  2016-08-01 14:16   ` Clément Pit--Claudel
  2016-08-02 14:24 ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2016-08-01 13:56 UTC (permalink / raw)
  To: Clément Pit--Claudel; +Cc: emacs-devel

> From: Clément Pit--Claudel <clement.pit@gmail.com>
> Date: Mon, 1 Aug 2016 09:11:19 -0400
> 
> Or is it expected that infinite recursion from ELisp can crash Emacs?

Yes, because it causes stack overflow.

On some platforms, Emacs recently learned how to recover from stack
overflow, but that protection is not 100% reliable even on those
platforms (notably, stack overflow during GC cannot be recovered
from), and even if Emacs recovers we recommend to orderly shut down
the session and start another one.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Should I report Emacs crashes due to ELisp infinite recursion?
  2016-08-01 13:56 ` Eli Zaretskii
@ 2016-08-01 14:16   ` Clément Pit--Claudel
  0 siblings, 0 replies; 4+ messages in thread
From: Clément Pit--Claudel @ 2016-08-01 14:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 606 bytes --]

On 2016-08-01 09:56, Eli Zaretskii wrote:
>> From: Clément Pit--Claudel <clement.pit@gmail.com>
>> Date: Mon, 1 Aug 2016 09:11:19 -0400
>>
>> Or is it expected that infinite recursion from ELisp can crash Emacs?
> 
> Yes, because it causes stack overflow.
> 
> On some platforms, Emacs recently learned how to recover from stack
> overflow, but that protection is not 100% reliable even on those
> platforms (notably, stack overflow during GC cannot be recovered
> from), and even if Emacs recovers we recommend to orderly shut down
> the session and start another one.

Perfect, thanks!


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Should I report Emacs crashes due to ELisp infinite recursion?
  2016-08-01 13:11 Should I report Emacs crashes due to ELisp infinite recursion? Clément Pit--Claudel
  2016-08-01 13:56 ` Eli Zaretskii
@ 2016-08-02 14:24 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2016-08-02 14:24 UTC (permalink / raw)
  To: emacs-devel

> Or is it expected that infinite recursion from ELisp can crash Emacs?

There can be cases where infinite recursion crashes Emacs, yes.
But these should be rare.  A first line of defense is the
max-specpdl-size and max-lisp-eval-depth.  If you have not changed those
and you still get a crash then it's worth M-x report-emacs-bug.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-02 14:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-01 13:11 Should I report Emacs crashes due to ELisp infinite recursion? Clément Pit--Claudel
2016-08-01 13:56 ` Eli Zaretskii
2016-08-01 14:16   ` Clément Pit--Claudel
2016-08-02 14:24 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).