[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5526: 23.1; (master) - charset.c possible unwise use of alloca(3)
From: |
Chong Yidong |
Subject: |
bug#5526: 23.1; (master) - charset.c possible unwise use of alloca(3) |
Date: |
Sat, 06 Feb 2010 08:27:53 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) |
Vivek Dasmohapatra <vivek@etla.org> writes:
> There are actually 3 other locations where the same thing happens, and the
> allocated blocks are stored in a linked list which you need to walk and
> free (I believe) if you switch over to using xmalloc instead. The attached
> patch should do the right thing.
Actually, after looking at this further, I think we need to use
SAFE_ALLOCA instead of xmalloc. I've changed the code accordingly.
Thanks for pointing out the additional changes required. (SAFE_ALLOCA
has a bit more overhead, but I don't see a performance problem after
making this change.)