ash parse tree and stack boundaries
Denys Vlasenko
vda.linux at googlemail.com
Wed Dec 1 14:11:09 UTC 2010
On Tue, Nov 30, 2010 at 1:57 PM, Phil Carmody
<ext-phil.2.carmody at nokia.com> wrote:
>> > 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.
>
> On your 32 bit system, with your toolchain, it might not crash. However, on
> two unrelated 32-bit systems it crashes for me, and clearly it crashes for
> Alexander too. To boldly assert "Therefore it does not crash." is quite
> absurd.
?!
I merely stated that it does not crash on (my) 32-bit system.
> Add to that the fact that Alexander clearly wrote "like", implying that
> the exact value was somewhat arbitrary, and your response looks even more
> absurd.
My response is factually correct. Moreover, I confirmed that the problem
is, indeed, real, since I was able to reproduce it with bigger value:
>> I reproduced this SEGV with 200000.
>
> Well, that's OK then, we'll consider the problem solved, shall we?
Apparently you interpreted my response that way, even though
it does not say anything like that anywhere.
I hope at least you feel better after venting your anger.
Because I don't.
--
vda
More information about the busybox
mailing list