emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Segmentation fault for large values of max-lisp-eval-depth


From: Stefan Monnier
Subject: Re: Segmentation fault for large values of max-lisp-eval-depth
Date: 29 Apr 2004 12:52:22 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> I don't grok this C level stuff,

It's actually assembler-level.

> but if this value is available to Emacs, couldn't it just check it and
> proceed in the same manner as when `max-lisp-eval-depth' is exceeded?

Well, just like you discovered, the value is not placed in a standard
variable, so for each and every system the variable name can be different.
There might not even be such a variable.
But even if we were to add the #ifdefs needed to get this variable name in
the few cases where we know it, it'd still be difficult to use: the stack
is extended at every function call by code introduced by the C compiler, so
we'd either have to hook into the compiler to add a check there (basically
hopeless) or do the check every once in a while (e.g. in `eval') and use
some "safety margin", hoping it'll be enough to keep us going til the next
such check, or rely on the SEGV signal: catch it and analyse it to see if
it's a stack overflow.
The last option is the best but is very system dependent and tricky
to write.

In other words: patches welcome,


        Stefan





reply via email to

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