From: Daniel Colascione <dancol@dancol.org>
To: Eli Zaretskii <eliz@gnu.org>,Steve Kemp <steve@steve.org.uk>
Cc: 27585@debbugs.gnu.org
Subject: bug#27585: segfault when evaluating a file containing only backticks
Date: Thu, 06 Jul 2017 08:52:44 -0700 [thread overview]
Message-ID: <6EDA4B5A-B345-4A8A-8F03-2925B671505B@dancol.org> (raw)
In-Reply-To: <83tw2qmzsl.fsf@gnu.org>
On July 5, 2017 12:47:22 PM PDT, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Steve Kemp <steve@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.
next prev parent reply other threads:[~2017-07-06 15:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 6:21 bug#27585: segfault when evaluating a file containing only backticks Steve Kemp
2017-07-05 7:51 ` Andreas Schwab
2017-07-05 8:26 ` Steve Kemp
2017-07-05 18:41 ` Eli Zaretskii
2017-07-05 18:55 ` Steve Kemp
2017-07-05 19:47 ` Eli Zaretskii
2017-07-06 3:46 ` Steve Kemp
2017-07-06 15:16 ` Eli Zaretskii
2017-07-06 15:33 ` Steve Kemp
2017-07-06 16:24 ` Eli Zaretskii
2017-07-06 6:46 ` Andreas Schwab
2017-07-06 15:19 ` Eli Zaretskii
2017-07-06 15:31 ` Andreas Schwab
2017-07-06 15:37 ` Eli Zaretskii
2017-07-06 15:41 ` Andreas Schwab
2017-07-06 15:52 ` Daniel Colascione [this message]
2017-07-06 16:19 ` Eli Zaretskii
2017-07-06 16:37 ` Daniel Colascione
2017-07-06 17:27 ` Eli Zaretskii
2017-07-06 15:48 ` Daniel Colascione
2017-07-14 12:09 ` Paul Eggert
2017-07-14 13:30 ` Eli Zaretskii
2017-07-15 5:03 ` Steve Kemp
2017-07-15 5:12 ` Paul Eggert
2017-07-15 7:15 ` Eli Zaretskii
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=6EDA4B5A-B345-4A8A-8F03-2925B671505B@dancol.org \
--to=dancol@dancol.org \
--cc=27585@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=steve@steve.org.uk \
/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.