[Top][All Lists]

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

bug#27585: segfault when evaluating a file containing only backticks

From: Daniel Colascione
Subject: bug#27585: segfault when evaluating a file containing only backticks
Date: Thu, 06 Jul 2017 08:52:44 -0700
User-agent: K-9 Mail for Android

On July 5, 2017 12:47:22 PM PDT, Eli Zaretskii <address@hidden> wrote:
>> From: Steve Kemp <address@hidden>
>> Date: Wed, 05 Jul 2017 18:55:31 +0000
>> > See above: the machinery to try and prevent it exists, but it
>> > always succeed.  And it really can't be 100% reliable.  So I'm
>> > what did you expect, and why.
>>   Honestly?  I expect Emacs to not crash.
>You wrote a program that triggers infinite recursion.  Such programs
>will crash in most, if not all, languages.  So your expectations are
>>  I expect evaluating lisp to not kill the editor
>Valid Lisp, I agree.  But yours isn't.
>Moreover, there are those among us (I'm not one of them) who thinks
>Emacs shouldn't even try to recover from stack overflow, they say it
>should crash hard right there and then.

Native stack? Certainly. The current approach, a signal handler that longjmps 
to top-level, cannot possibly work reliability, since it interrupts and 
abandons whatever the code is doing. If it has some kind of lock held and you 
try to take that lock again, you deadlock. Data structures might be in 
completely incoherent states. The last time we had this discussion, someone 
asserted that the worst that could happen might be a "memory leak". That's very 

This signal handler is a huge, ticking time bomb, and I completely turn it off 
in my Emacs. Everyone else should too.

Recovering when elisp blows the stack is a different matter.

>So your expectations are not necessarily shared, even as aspirations,
>by some developers.
>> > IOW: why would someone want to run such a silly "program"?
>>   In the real world?  Nobody.
>Then why are we discussing this use case?  Let's talk about
>more practical and interesting cases.

reply via email to

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