bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Input line length


From: Chet Ramey
Subject: Re: Input line length
Date: Mon, 07 Jun 2010 16:38:34 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 6/7/10 1:19 AM, Jan Schampera wrote:
> Chet Ramey wrote:
> 
>> How about a stack traceback?
> 
> I'm so sorry, I thought this was clear and easy to reproduce/verify.
> 
> I'm using this to generate the script. The number of commands varies
> between shell versions (and likely other platform stuff), so you might
> need to play around with the values a bit:
> 
> {
>   printf "#!/bin/bash\n"
>   for ((x=0; x<50000; x++)); do printf ":;"; done
>   echo
> } > length.sh
> chmod +x length.sh
> 
> Attached [bash41_hugeinput.bt.txt] is an excerpt of the backtrace from a
> Bash 4.1. The missing middle is always
> execute_command_internal()/execute_command().
> 
> The original finding was with a Bash 3.2, where the BT looks accordingly.

I bet this is the kernel killing bash when the stack size resource limit
is exceeded, not anything bash is doing or can catch.  As evidence I offer
the fact that it aborts with a SEGV with my default stack size limit, but
runs to completion when I increase the stack limit to unlimited (without
changing any others, so the malloc arena size doesn't increase, for
instance).

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]