[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Avoid C stack overflow
From: |
Stephen J. Turnbull |
Subject: |
Re: Avoid C stack overflow |
Date: |
Sat, 15 Mar 2014 10:38:05 +0900 |
Stefan writes:
> > Emacs already has a stack-overflow prevention mechanism, right?
>
> Yes.
>
> > And we're talking about what to do when the user deliberately disables
> > it? So the simplest answer is "don't do that".
>
> Actually, when we bump into something like max-lisp-eval-depth, we
> could look at the actual C stack size to compute the average "C stack
Surely you want a worst-case-experienced-in-practice estimate here.
So you should collect data on *variation* of the ratio of C stack size
to max-lisp-eval-depth as well.
N.B. Unless the stack is extremely well-behaved across Lisp programs,
you're computing max-lisp-eval-depth to stack size for the case where
you hit max-lisp-eval-depth. It might very well be that this is quite
different from cases where you don't. I don't know if this *matters*
in any practical application to Emacs development, probably not. But
I don't know what other uses people might find for this statistic.
> usage per Lisp eval depth" and from that compute a approximate upper
> bound on the maximum safe value of max-lisp-eval-depth.
- Re: Avoid C stack overflow, (continued)
- Re: Avoid C stack overflow, Eli Zaretskii, 2014/03/13
- Re: Avoid C stack overflow, Paul Eggert, 2014/03/13
- Re: Avoid C stack overflow, Eli Zaretskii, 2014/03/13
- Re: Avoid C stack overflow, Dmitry Antipov, 2014/03/14
- Re: Avoid C stack overflow, Paul Eggert, 2014/03/14
- Re: Avoid C stack overflow, Dmitry Antipov, 2014/03/14
- Re: Avoid C stack overflow, Stefan Monnier, 2014/03/14
- Re: Avoid C stack overflow, Paul Eggert, 2014/03/14
- Re: Avoid C stack overflow, Stefan, 2014/03/14
- Re: Avoid C stack overflow,
Stephen J. Turnbull <=