[Top][All Lists]

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

bug#16999: calc crashes when computation limit is increased

From: Dmitry Antipov
Subject: bug#16999: calc crashes when computation limit is increased
Date: Thu, 13 Mar 2014 09:13:54 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 03/13/2014 02:44 AM, Jay Belanger wrote:

This seems to be an Emacs problem, rather than a problem specific to Calc.
Typing M doubles the sizes of `max-lisp-eval-depth' and
`max-specpdl-size'.  Having  `max-lisp-eval-depth' equal to 64000 by
itself doesn't seem to cause problems, but having `max-lisp-eval-depth'
equal to 64000 and `max-specpdl-size' equal to 83200 does cause Emacs to
crash on an infinite loop; evaluating:

   (setq max-specpdl-size 83200
         max-lisp-eval-depth 64000)

   (defun f ()


will crash Emacs.

This is C stack overflow (try to attach gdb and do 'bt' on crash). On
*NIX system, 'ulimit -s' shows your current limit.

Perhaps there should be a kind of protection against this. For example,
eval_sub can check current stack depth against getrlimit (RLIMIT_STACK,...).


reply via email to

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