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

From: Daniel Colascione <[email-masked]>
Date: Thu, 06 Jul 2017 09:37:30 -0700

On July 6, 2017 9:19:40 AM PDT, Eli Zaretskii <[email-masked]> wrote:
>> Date: Thu, 06 Jul 2017 08:52:44 -0700
>> CC: [email-masked]
>> From: Daniel Colascione <[email-masked]>
>> 
>> >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.
>
>Yes, this discussion is about the native stack, not the ELisp stack.

Sort of --- an elisp file is driving the native code to blow its stack. I really don't think that any valid syntax should cause Emacs to segfault.

In this instance, couldn't we add a hard threshold to limit recursion?

>
>> Recovering when elisp blows the stack is a different matter.
>
>I believe we already do that.

We have a threshold. It's conservative, but it works most of the time. IMHO, explicit stack probing would be both less conservative and note robust.