From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: dmantipov@yandex.ru, emacs-devel@gnu.org, eggert@cs.ucla.edu
Subject: Re: [Emacs-diffs] trunk r117912: Minor improvements to new stack-allocated Lisp objects.
Date: Mon, 22 Sep 2014 18:00:27 +0300 [thread overview]
Message-ID: <83fvfjya2c.fsf@gnu.org> (raw)
In-Reply-To: <jwvsijjyg0n.fsf-monnier+emacsdiffs@gnu.org>
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Mon, 22 Sep 2014 08:57:13 -0400
> Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel@gnu.org
>
> > SAFE_ALLOCA and friends has exactly the same problems, and I don't see
> > the way to make it absolutely safe with an existing implementations of
> > alloca.
>
> We don't need it to be absolutely safe (it's a given that using pointers
> into stack-allocated objects is generally unsafe, unless we use some
> code analysis to try and enforce some discipline).
That's not the issue here, AFAIU. The issue here is that if you use
SAFE_ALLOCA inside a loop, each call to it might decide to call
alloca, because the size is small enough, but the sum of all
allocations could easily exceed the stack space, certainly the 16KB
limit we want to impose on such allocations.
We don't have a lot of these in the sources, but we do have a few.
> But the rules that have to be followed need to be *very* clear and
> stated in the most obvious (or in your face) place.
Where?
next prev parent reply other threads:[~2014-09-22 15:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1XVpwf-0005xe-7w@vcs.savannah.gnu.org>
2014-09-22 5:08 ` [Emacs-diffs] trunk r117912: Minor improvements to new stack-allocated Lisp objects Stefan Monnier
2014-09-22 5:40 ` Paul Eggert
2014-09-22 6:42 ` Dmitry Antipov
2014-09-22 8:19 ` Dmitry Antipov
2014-09-22 12:57 ` Stefan Monnier
2014-09-22 15:00 ` Eli Zaretskii [this message]
2014-09-22 14:44 ` Eli Zaretskii
2014-09-22 15:32 ` Paul Eggert
2014-09-22 16:04 ` Dmitry Antipov
2014-09-22 19:09 ` Eli Zaretskii
2014-09-23 5:53 ` Paul Eggert
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=83fvfjya2c.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dmantipov@yandex.ru \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.