bug-bash
[Top][All Lists]
Advanced

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

Re: No recursion limit in functions


From: Chet Ramey
Subject: Re: No recursion limit in functions
Date: Tue, 02 Dec 2003 13:45:39 -0500

> Bash has no recursion limit in functions, so
>       function xxx { xxx; }
>       xxx
> Causes bash to consume more and more memory until it dies (Illegal 
> Instruction, Segmentation Fault, etc. - the signal heavily depends on 
> the platform).

        [...]

> Whether this really makes sense to limit it the number to a hardcoded 
> number of recursive functions is not sure....
> Perhaps a higher number such as 50 or 100 would make more sense.
> However, in our opinion, such a recursion limit is necessary because a 
> single user can use excessive memory and cause the process to hang or 
> crash without it.

This is something that should be addressed by a system administrator
establishing realistic resource limits.

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://tiswww.tis.cwru.edu/~chet/




reply via email to

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