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: Chet Ramey
Subject: Re: bash segfaults on simple function
Date: Tue, 29 Jul 2003 13:54:36 -0400

> Machine Type: i686-pc-linux-gnu
> 
> Bash Version: 2.05a
> Patch Level: 0
> Release Status: release
> 
> don't know if you guys already fixed this.
> 
>          $ 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.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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