From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r117912: Minor improvements to new stack-allocated Lisp objects. Date: Mon, 22 Sep 2014 10:42:35 +0400 Message-ID: <541FC4DB.3050307@yandex.ru> References: <541FB63B.4070403@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1411368214 18074 80.91.229.3 (22 Sep 2014 06:43:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Sep 2014 06:43:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 22 08:43:23 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XVxLF-0002RZ-MW for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2014 08:43:21 +0200 Original-Received: from localhost ([::1]:42758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVxLF-0003nF-BO for ged-emacs-devel@m.gmane.org; Mon, 22 Sep 2014 02:43:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVxKv-0003gT-Lu for emacs-devel@gnu.org; Mon, 22 Sep 2014 02:43:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVxKo-0006Cf-G0 for emacs-devel@gnu.org; Mon, 22 Sep 2014 02:43:01 -0400 Original-Received: from forward4p.cmail.yandex.net ([77.88.31.19]:40078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVxKo-0006C8-8v for emacs-devel@gnu.org; Mon, 22 Sep 2014 02:42:54 -0400 Original-Received: from smtp19.mail.yandex.net (smtp19.mail.yandex.net [95.108.252.19]) by forward4p.cmail.yandex.net (Yandex) with ESMTP id DB3461190; Mon, 22 Sep 2014 10:42:36 +0400 (MSK) Original-Received: from smtp19.mail.yandex.net (localhost [127.0.0.1]) by smtp19.mail.yandex.net (Yandex) with ESMTP id 87EA6BE0C17; Mon, 22 Sep 2014 10:42:36 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp19.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id wgkpspA5RY-gZFGj3Xm; Mon, 22 Sep 2014 10:42:35 +0400 (using TLSv1.2 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 4227d35a-13bd-4b26-8ca8-ec6c818de2ad DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1411368155; bh=JyXW/SF1/6QPlAvHdpQWa26U/s4sp22Vn2ZzNixmSEs=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=lRqzJNSk5RPgKw5VO89C8E2S7rpTKpg313QvvQKxZwPhwLoHUMJE6orrZ3PrdRYlG Q0WLx08Yw2uJTg1XL7SuvQSbQJLLBxgLuTj8xZKlw+lJ02CsM0jluVnGeVMcA1nKxC glL7A0it7/yf7Ednv3fSiP2VKKe5n1mo0ZHMnzXE= Authentication-Results: smtp19.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 In-Reply-To: <541FB63B.4070403@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 77.88.31.19 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174636 Archived-At: 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. Dmitry