bug-bash
[Top][All Lists]
Advanced

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

Re: Input line length


From: Jan Schampera
Subject: Re: Input line length
Date: Mon, 07 Jun 2010 07:19:45 +0200
User-agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100329)

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.

Regards,
Jan "TheBonsai"
#0  internal_malloc (n=16, file=0x4adee3 "execute_cmd.c", line=289, 
flags=<value optimized out>) at malloc.c:739
#1  0x000000000046d827 in sh_xmalloc (bytes=16, file=0x4adee3 "execute_cmd.c", 
line=289) at xmalloc.c:183
#2  0x0000000000433174 in new_fd_bitmap (size=32) at execute_cmd.c:289
#3  0x0000000000434c4f in execute_command (command=0x2bf61c8) at 
execute_cmd.c:370
#4  0x00000000004348cb in execute_command_internal (command=0x2bf6308, 
asynchronous=0, pipe_in=-1, pipe_out=-1, 
    fds_to_close=0x43ef388) at execute_cmd.c:2229
#5  0x0000000000434c7f in execute_command (command=0x2bf6308) at 
execute_cmd.c:375
#6  0x00000000004348cb in execute_command_internal (command=0x2bf6488, 
asynchronous=0, pipe_in=-1, pipe_out=-1, 
    fds_to_close=0x43ef2a8) at execute_cmd.c:2229
#7  0x0000000000434c7f in execute_command (command=0x2bf6488) at 
execute_cmd.c:375
#8  0x00000000004348cb in execute_command_internal (command=0x2bf65c8, 
asynchronous=0, pipe_in=-1, pipe_out=-1, 
    fds_to_close=0x43ef1c8) at execute_cmd.c:2229
#9  0x0000000000434c7f in execute_command (command=0x2bf65c8) at 
execute_cmd.c:375
...
...
...
#87280 0x00000000004348cb in execute_command_internal (command=0x3a9c548, 
asynchronous=0, pipe_in=-1, pipe_out=-1, 
    fds_to_close=0x3a9cc48) at execute_cmd.c:2229
#87281 0x0000000000434c7f in execute_command (command=0x3a9c548) at 
execute_cmd.c:375
#87282 0x00000000004348cb in execute_command_internal (command=0x3a9c6a8, 
asynchronous=0, pipe_in=-1, pipe_out=-1, 
    fds_to_close=0x3a9cb68) at execute_cmd.c:2229
#87283 0x0000000000434c7f in execute_command (command=0x3a9c6a8) at 
execute_cmd.c:375
#87284 0x00000000004348cb in execute_command_internal (command=0x3a9c808, 
asynchronous=0, pipe_in=-1, pipe_out=-1, 
    fds_to_close=0x3a9ca88) at execute_cmd.c:2229
#87285 0x0000000000434c7f in execute_command (command=0x3a9c808) at 
execute_cmd.c:375
#87286 0x00000000004348cb in execute_command_internal (command=0x3a9c968, 
asynchronous=0, pipe_in=-1, pipe_out=-1, 
    fds_to_close=0x3a9c9a8) at execute_cmd.c:2229
#87287 0x0000000000434c7f in execute_command (command=0x3a9c968) at 
execute_cmd.c:375
#87288 0x00000000004216d2 in reader_loop () at eval.c:152
#87289 0x00000000004212d9 in main (argc=2, argv=0x7fffe8469e48, 
env=0x7fffe8469e60) at shell.c:749


reply via email to

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