From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#5526: 23.1; (master) - charset.c possible unwise use of alloca(3) Date: Thu, 04 Feb 2010 23:15:04 -0500 Message-ID: <877hqs9v3r.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265366003 17538 80.91.229.12 (5 Feb 2010 10:33:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Feb 2010 10:33:23 +0000 (UTC) Cc: 5526@debbugs.gnu.org To: Vivek Dasmohapatra Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 05 11:33:20 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NdLTr-00032G-EP for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2010 11:32:07 +0100 Original-Received: from localhost ([127.0.0.1]:39045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdFnR-0000KD-N7 for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Feb 2010 23:27:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdFnC-0000CS-3S for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:27:42 -0500 Original-Received: from [199.232.76.173] (port=47107 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdFnB-0000CA-1F for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:27:41 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdFn8-0003J9-DN for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:27:41 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38529) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NdFn8-0003J0-4U for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:27:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NdFbu-0004lp-6u; Thu, 04 Feb 2010 23:16:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2010 04:16:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5526 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5526-submit@debbugs.gnu.org id=B5526.126534333218307 (code B ref 5526); Fri, 05 Feb 2010 04:16:02 +0000 Original-Received: (at 5526) by debbugs.gnu.org; 5 Feb 2010 04:15:32 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NdFbP-0004lE-T5 for submit@debbugs.gnu.org; Thu, 04 Feb 2010 23:15:32 -0500 Original-Received: from pantheon-po35.its.yale.edu ([130.132.50.83]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NdFbO-0004l3-4h for 5526@debbugs.gnu.org; Thu, 04 Feb 2010 23:15:30 -0500 Original-Received: from furry (bb116-15-9-83.singnet.com.sg [116.15.9.83]) (authenticated bits=0) by pantheon-po35.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o154F5jF019392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 4 Feb 2010 23:15:16 -0500 Original-Received: by furry (Postfix, from userid 1000) id 0C2EDC05D; Thu, 4 Feb 2010 23:15:04 -0500 (EST) In-Reply-To: (Vivek Dasmohapatra's message of "Fri, 5 Feb 2010 02:55:12 +0000 (GMT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 04 Feb 2010 23:16:02 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34909 Archived-At: Vivek Dasmohapatra writes: > In src/charset.c, in load_charset_map_from_file (and .._vector) > alloca is used to allocate sizeof (struct charset_map_entries) bytes: > which is 786436 bytes - this segfaults while building in a qemu-armel > scratchbox (alloca does not return an error, so its return value cannot > be checked). > > In any case, this is more than MAX_ALLOCA, and can occur several times > in a while(1) loop in the same function. Thanks for pointing this out. I have changed it to use the heap instead.