bug-bash
[Top][All Lists]
Advanced

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

Re: 2.05b segfaults on extremely long "for" lists


From: Chet Ramey
Subject: Re: 2.05b segfaults on extremely long "for" lists
Date: Wed, 31 Jul 2002 10:16:36 -0400

> 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=20
> > file $FNAME;=20
> > done
> 
> On my system, this gives the for loop 17,924 items to work on.

I cannot reproduce this on Red Hat 7.0, compiled with RH's gcc 2.96,
with 26412 items in the for loop list.  I used both static and dynamic
versions of bash.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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