From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: eggert@cs.ucla.edu, 16999@debbugs.gnu.org
Subject: bug#16999: calc crashes when computation limit is increased
Date: Thu, 13 Mar 2014 18:56:53 +0200 [thread overview]
Message-ID: <834n32niju.fsf@gnu.org> (raw)
In-Reply-To: <53217656.7080608@yandex.ru>
> Date: Thu, 13 Mar 2014 13:11:50 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
> CC: Paul Eggert <eggert@cs.ucla.edu>, Eli Zaretskii <eliz@gnu.org>
>
> On 03/13/2014 09:13 AM, Dmitry Antipov wrote:
>
> > Perhaps there should be a kind of protection against this. For example,
> > eval_sub can check current stack depth against getrlimit (RLIMIT_STACK,...).
>
> This is rather simple on general *NIX. But:
>
> 1) it should be implemented for MS-Windows and OSX too if we really need this;
It should be easy enough to emulate on MS-Windows getrlimit that
supports RLIMIT_STACK. Let me know if you want me to do that (should
ideally be ready before it is used, to avoid breaking the build).
> 2) Linux has prlimit to tweak limits of another process at run time,
> so actual limit should be checked each time eval_sub is called, thus
> introducing a (minor?) slowdown.
I'm not sure we should bother. We already use getrlimit/setrlimit for
making sure the stack is large enough to accommodate re_max_failures.
We do that only once, at startup, and never look back. And yet I
don't think we've seen regexp related crashes that would point to
stack overflow.
next prev parent reply other threads:[~2014-03-13 16:56 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=834n32niju.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=16999@debbugs.gnu.org \
--cc=dmantipov@yandex.ru \
--cc=eggert@cs.ucla.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.