[PATCH 2/2] ash: use alloca to get rid of setjmp

Rich Felker dalias at libc.org
Wed Jul 1 18:35:54 UTC 2015


On Wed, Jul 01, 2015 at 04:46:18PM +0100, Ron Yorston wrote:
> Now that the only thing protected by setjmp/longjmp is the saved string,
> we can allocate it on the stack to get rid of the jump.
> 
> Based on commit bd35d8e from git://git.kernel.org/pub/scm/utils/dash/dash.git
> by Herbert Xu.

In general alloca is unsafe. It's not obvious to me what the code here
is doing, so I can't tell for sure if it's safe or not, but I think
this needs a strong justification of safety before being acceptable.

Rich


More information about the busybox mailing list