bug-bash
[Top][All Lists]
Advanced

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

Re: bash segfaults on simple function


From: Scott McDermott
Subject: Re: bash segfaults on simple function
Date: Tue, 29 Jul 2003 14:04:10 -0400
User-agent: Mutt/1.2.5.1i

Chet Ramey on Tue 29/07 13:54 -0400:
> >          $ type gg
> >         + type gg
> >         gg is a function
> >         gg ()
> >         {
> >             local search;
> >             local param;
> >             while true; do
> >                 param=`echo "$1" | sed 's, ,%20,g'`;
> >                 search="$search%22$param%22";
> >                 shift;
> >             done;
> >             links 
> > "http://www.google.com/search?hl=en&ie=ISO=8859-1&q=$search";
> >         }
> >
> >          $ gg
> 
> You've written a dandy infinite loop there.  Eventually
> you're going to run out of some resource, and the shell
> will probably crash.

I know, but the shell should not segfault on an allocation
failure, which appears to be what it's doing.




reply via email to

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