unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Vivek Dasmohapatra <vivek@etla.org>
Cc: 5526@debbugs.gnu.org
Subject: bug#5526: 23.1; (master) - charset.c possible unwise use of alloca(3)
Date: Thu, 04 Feb 2010 23:15:04 -0500	[thread overview]
Message-ID: <877hqs9v3r.fsf@stupidchicken.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1002050204590.1278@octopus.pepperfish.net> (Vivek Dasmohapatra's message of "Fri, 5 Feb 2010 02:55:12 +0000 (GMT)")

Vivek Dasmohapatra <vivek@etla.org> 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.






  reply	other threads:[~2010-02-05  4:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05  2:55 bug#5526: 23.1; (master) - charset.c possible unwise use of alloca(3) Vivek Dasmohapatra
2010-02-05  4:15 ` Chong Yidong [this message]
2010-02-05 14:05   ` Vivek Dasmohapatra
2010-02-06 13:27     ` Chong Yidong
2010-02-06 18:08       ` Vivek Dasmohapatra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hqs9v3r.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=5526@debbugs.gnu.org \
    --cc=vivek@etla.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).