all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r117912: Minor improvements to new stack-allocated Lisp objects.
Date: Mon, 22 Sep 2014 08:57:13 -0400	[thread overview]
Message-ID: <jwvsijjyg0n.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <541FC4DB.3050307@yandex.ru> (Dmitry Antipov's message of "Mon, 22 Sep 2014 10:42:35 +0400")

>> For example, build_desired_tool_bar_string has a loop, each iteration
>> of which creates temporaries; here local_list4 could exhaust the
>> stack whereas scoped_list4 is fine, and trunk bzr 117912 fixed that
>> by replacing local_list4 with scoped_list4.

Yuck!

> 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).

But the rules that have to be followed need to be *very* clear and
stated in the most obvious (or in your face) place.

[ And even if we do that, someone unfamiliar with those rules will come
  up and modify "unrelated" code which end up breaking them.  ]


        Stefan



  parent reply	other threads:[~2014-09-22 12:57 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 [this message]
2014-09-22 15:00         ` Eli Zaretskii
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=jwvsijjyg0n.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dmantipov@yandex.ru \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /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.