From: Dmitry Antipov <dmantipov@yandex.ru>
To: jay.p.belanger@gmail.com, Florian Beck <fb@miszellen.de>
Cc: 16999@debbugs.gnu.org
Subject: bug#16999: calc crashes when computation limit is increased
Date: Thu, 13 Mar 2014 09:13:54 +0400 [thread overview]
Message-ID: <53213E92.9010506@yandex.ru> (raw)
In-Reply-To: <87vbvjca0w.fsf@gmail.com>
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 ()
> (f))
>
> (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,...).
Dmitry
next prev parent reply other threads:[~2014-03-13 5:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 18:30 bug#16999: calc crashes when computation limit is increased Florian Beck
2014-03-12 22:44 ` Jay Belanger
2014-03-13 5:13 ` Dmitry Antipov [this message]
2014-03-13 9:11 ` Dmitry Antipov
2014-03-13 14:06 ` Florian Beck
2014-03-13 14:30 ` Dmitry Antipov
2014-03-13 16:56 ` Eli Zaretskii
2014-03-13 13:42 ` Stefan Monnier
2014-03-13 14:12 ` Florian Beck
2014-03-13 21:15 ` Jay Belanger
2014-03-13 22:10 ` Stefan Monnier
2020-09-09 12:19 ` Lars Ingebrigtsen
2020-09-10 16:02 ` Mattias Engdegård
2020-09-11 10:29 ` Mattias Engdegård
2020-09-11 11:54 ` Lars Ingebrigtsen
2020-09-14 9:45 ` Mattias Engdegård
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53213E92.9010506@yandex.ru \
--to=dmantipov@yandex.ru \
--cc=16999@debbugs.gnu.org \
--cc=fb@miszellen.de \
--cc=jay.p.belanger@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).