From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#18410: Use SAFE_ALLOCA etc. to avoid unbounded stack allocation. Date: Sun, 07 Sep 2014 22:22:23 -0400 Message-ID: References: <5409536B.5090201@cs.ucla.edu> <540C0741.8090900@cs.ucla.edu> <83bnqrcq7u.fsf@gnu.org> <540CC106.8040705@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410143009 20514 80.91.229.3 (8 Sep 2014 02:23:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Sep 2014 02:23:29 +0000 (UTC) Cc: 18410@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 08 04:23:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1XQobw-0005D2-NU for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Sep 2014 04:23:20 +0200 Original-Received: from localhost ([::1]:40287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQobw-0006Hx-7F for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Sep 2014 22:23:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQobl-0006Ds-L4 for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2014 22:23:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQobe-0001xJ-6I for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2014 22:23:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQobe-0001xF-4I for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2014 22:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XQobd-0000Q2-Ov for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2014 22:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Sep 2014 02:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18410 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 18410-submit@debbugs.gnu.org id=B18410.14101429521560 (code B ref 18410); Mon, 08 Sep 2014 02:23:01 +0000 Original-Received: (at 18410) by debbugs.gnu.org; 8 Sep 2014 02:22:32 +0000 Original-Received: from localhost ([127.0.0.1]:33088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQob9-0000P3-Hm for submit@debbugs.gnu.org; Sun, 07 Sep 2014 22:22:32 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:27176) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQob7-0000Op-Qf for 18410@debbugs.gnu.org; Sun, 07 Sep 2014 22:22:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZDoJ4g0rAPYEXF3SCJQEBAQECAVYjBQsLNBIUGA0kiAQI0hkXjnoHhDgEoyqFb4FqgnBcIQ X-IPAS-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZDoJ4g0rAPYEXF3SCJQEBAQECAVYjBQsLNBIUGA0kiAQI0hkXjnoHhDgEoyqFb4FqgnBcIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="89048290" Original-Received: from 69-165-145-6.dsl.teksavvy.com (HELO ceviche.home) ([69.165.145.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2014 22:22:24 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id DAB41660C4; Sun, 7 Sep 2014 22:22:23 -0400 (EDT) In-Reply-To: <540CC106.8040705@cs.ucla.edu> (Paul Eggert's message of "Sun, 07 Sep 2014 13:33:10 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93125 Archived-At: > Usually MAX_ALLOCA-related code falls back on malloc, and does not exit > merely because a request was larger. callproc.c's child_setup function is MAX_ALLOCA is chosen small so that we can allocate several/many objects of size MAX_ALLOCA. Whereas in this case, after this alloca we're not expected to use up the stack much more (we're about to `exec' anyway, right?). So MAX_ALLOCA is much too conservative for this case. Stefan