GNU bug report logs -
#27585
segfault when evaluating a file containing only backticks
Previous Next
Reported by: Steve Kemp <steve <at> steve.org.uk>
Date: Wed, 5 Jul 2017 06:29:02 UTC
Severity: minor
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On July 5, 2017 12:47:22 PM PDT, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Steve Kemp <steve <at> steve.org.uk>
>> Date: Wed, 05 Jul 2017 18:55:31 +0000
>>
>> > See above: the machinery to try and prevent it exists, but it
>doesn't
>> > always succeed. And it really can't be 100% reliable. So I'm
>unsure
>> > 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
>unrealistic.
>
>> 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 wrong.
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.
This bug report was last modified 7 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.