ash parse tree and stack boundaries

Denys Vlasenko vda.linux at googlemail.com
Mon Nov 29 14:17:35 UTC 2010


On Mon, Nov 29, 2010 at 2:47 PM, Alexander Shishkin <virtuoso at slind.org> wrote:
> Hi,
>
> There's a problem in busybox ash, which is running out of stack when parsing
> very long input (funnily same bug also exists in bash), like
>
> $ for i in $(seq 100000); do echo -n ":;"; done | busybox sh
> Segmentation fault

On a 32-bit system, 100000 needs 7 Mb of stack.
The default limit is 8. Therefore it does not crash.

I reproduced this SEGV with 200000.

-- 
vda


More information about the busybox mailing list