From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vivek Dasmohapatra Newsgroups: gmane.emacs.bugs Subject: bug#5526: 23.1; (master) - charset.c possible unwise use of alloca(3) Date: Sat, 6 Feb 2010 18:08:19 +0000 (GMT) Message-ID: References: <877hqs9v3r.fsf@stupidchicken.com> <87636ao5nq.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1265480884 15244 80.91.229.12 (6 Feb 2010 18:28:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Feb 2010 18:28:04 +0000 (UTC) Cc: 5526@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 06 19:28:02 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 1NdpNx-0002pc-Of for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Feb 2010 19:28:02 +0100 Original-Received: from localhost ([127.0.0.1]:42641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdpNx-00027Z-7P for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Feb 2010 13:28:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdpNj-0001zn-Ji for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2010 13:27:47 -0500 Original-Received: from [199.232.76.173] (port=36247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdpNj-0001zF-4K for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2010 13:27:47 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdpNg-0007FJ-TE for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2010 13:27:46 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35981) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NdpNg-0007F5-FP for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2010 13:27:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Ndp5Z-0000Sh-Pp; Sat, 06 Feb 2010 13:09:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Vivek Dasmohapatra Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Feb 2010 18:09:01 +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.12654797381769 (code B ref 5526); Sat, 06 Feb 2010 18:09:01 +0000 Original-Received: (at 5526) by debbugs.gnu.org; 6 Feb 2010 18:08:58 +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 1Ndp5V-0000SU-Q5 for submit@debbugs.gnu.org; Sat, 06 Feb 2010 13:08:58 -0500 Original-Received: from flounder.pepperfish.net ([87.237.62.181]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ndp5T-0000SJ-KQ for 5526@debbugs.gnu.org; Sat, 06 Feb 2010 13:08:56 -0500 Original-Received: from localhost ([127.0.0.1]) by flounder.pepperfish.net with esmtps (Exim 4.69 #1 (Debian)) id 1Ndp4w-0003V9-JO; Sat, 06 Feb 2010 18:08:22 +0000 X-X-Sender: vivek@octopus.pepperfish.net In-Reply-To: <87636ao5nq.fsf@stupidchicken.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 06 Feb 2010 13:09:01 -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:34929 Archived-At: > Actually, after looking at this further, I think we need to use > SAFE_ALLOCA instead of xmalloc. I've changed the code accordingly. Whatever you think is best... I wasn't sure if SAFE_ALLOCA was the right thing to use, since the size of the struct was so much > than MAX_ALLOCA that the xmalloc path would always be taken. I suspect it's unlikely to impact performance as I don't imagine emacs spends a lot of time loading charsets over and over again.