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: Paul Jarc
Subject: Re: No recursion limit in functions
Date: Tue, 02 Dec 2003 15:56:55 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Frederik Meerwaldt <frederik@freddym.org> wrote:
> (Illegal Instruction, Segmentation Fault, etc. - the signal heavily
> depends on the platform).

That part is a bug.  bash should check for memory allocation errors.
It seems to do so, but not perfectly:

$ softlimit -m 8000000 bash -c 'function xxx { xxx; }; xxx'
bash: xmalloc: subst.c:5518: cannot allocate 112 bytes (0 bytes allocated)
$ softlimit -m 16000000 bash -c 'function xxx { xxx; }; xxx'
Segmentation fault

Of course, the bug might be in some underlying library code, not in
bash itself.


paul




reply via email to

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