From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18410: Use SAFE_ALLOCA etc. to avoid unbounded stack allocation. Date: Sun, 07 Sep 2014 20:09:25 +0300 Message-ID: <83bnqrcq7u.fsf@gnu.org> References: <5409536B.5090201@cs.ucla.edu> <540C0741.8090900@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1410109825 1282 80.91.229.3 (7 Sep 2014 17:10:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Sep 2014 17:10:25 +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 Sun Sep 07 19:10:18 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 1XQfyj-0005D2-HL for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Sep 2014 19:10:17 +0200 Original-Received: from localhost ([::1]:38942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQfyj-0003ep-20 for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Sep 2014 13:10:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQfya-0003dJ-PE for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2014 13:10:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XQfyU-0002GV-SK for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2014 13:10:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XQfyU-0002GL-PV for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2014 13:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XQfyU-0003eX-8M for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2014 13:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Sep 2014 17:10:02 +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.141010977013993 (code B ref 18410); Sun, 07 Sep 2014 17:10:02 +0000 Original-Received: (at 18410) by debbugs.gnu.org; 7 Sep 2014 17:09:30 +0000 Original-Received: from localhost ([127.0.0.1]:32950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQfxy-0003dd-30 for submit@debbugs.gnu.org; Sun, 07 Sep 2014 13:09:30 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:52365) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XQfxu-0003dL-Uw for 18410@debbugs.gnu.org; Sun, 07 Sep 2014 13:09:28 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NBJ00L00JFA9000@a-mtaout20.012.net.il> for 18410@debbugs.gnu.org; Sun, 07 Sep 2014 20:09:20 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NBJ00K8GJNJQ9B0@a-mtaout20.012.net.il>; Sun, 07 Sep 2014 20:09:20 +0300 (IDT) In-reply-to: <540C0741.8090900@cs.ucla.edu> X-012-Sender: halo1@inter.net.il 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:93105 Archived-At: > Date: Sun, 07 Sep 2014 00:20:33 -0700 > From: Paul Eggert > > I installed the patch as trunk bzr 117829 and am marking this as done. What is the rationale for tests such as this one in callproc.c: if (MAX_ALLOCA / sizeof *env - 2 < new_length) exec_failed (new_argv[0], ENOMEM); MAX_ALLOCA is a relatively small number compared to the stack space available on modern systems, so I see no reason to fail and exit in these cases, it sounds too drastic. Perhaps we should have a separate constant with platform-specific value, if we want such tests. Or maybe make them conditional on ENABLE_CHECKING.