[Top][All Lists]

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

Re: [Emacs-diffs] trunk r117912: Minor improvements to new stack-allocat

From: Dmitry Antipov
Subject: Re: [Emacs-diffs] trunk r117912: Minor improvements to new stack-allocated Lisp objects.
Date: Mon, 22 Sep 2014 10:42:35 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

On 09/22/2014 09:40 AM, Paul Eggert wrote:

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.  There appear to be similar 
problems in every function
that currently uses local_cons or local_list*, so I'm thinking we should remove 
these macros and
go back to Fcons and list*.

We should also audit uses of make_local_vector, make_local_string, and 
build_local_string to make sure
that none of them are in loops that could blow the stack.  I think most uses of 
these are OK but
some are questionable.

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.  This applies to 
VLAs as well.

Someday we will be able to utilize -fsplit-stack; it may be reasonable to define
USE_LOCAL_LISP_OBJECTS only if -fsplit-stack is also supported.


reply via email to

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