bug-bash
[Top][All Lists]
Advanced

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

2.05b segfaults on extremely long "for" lists


From: Kelledin
Subject: 2.05b segfaults on extremely long "for" lists
Date: Fri, 19 Jul 2002 07:27:24 -0500
User-agent: KMail/1.4.2

Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-incept-linux-gnu' 
-DCONF_VENDOR='incept' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib 
-O2 -march=i486
uname output: Linux valhalla 2.4.18-1 #4 Mon Jun 10 22:08:58 CDT 2002 i686 
AuthenticAMD
Machine Type: i486-incept-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
If I cause bash to run through a for loop with a great many arguments, it
segfaults.  Probably an overflow somewhere...

Repeat-By:
I managed to force a segfault with the following test:

[ address@hidden ~ ] # for FNAME in /usr/share/* \
> /usr/share/*/*/* \
> /usr/share/*/*/*/* \
> /usr/share/*/*/*/*/*; do 
> file $FNAME; 
> done

On my system, this gives the for loop 17,924 items to work on.

bash-2.05a holds up just fine; bash-2.05b segfaults.

Fix:
        [Description of how to fix the problem.  If you don't know a
        fix for the problem, don't include this section.]




reply via email to

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