[Top][All Lists]

[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: Wed, 03 Dec 2003 10:34:06 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Chet Ramey <address@hidden> wrote:
>> $ 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
> It's not a bug.  Generally the signal is raised by the kernel when it
> attempts to allocate more stack space for the recursive call.

Ah, ok.  So that could be avoided by using an explicit stack instead
of recursion, but that's more of a judgment call.  As you say, not a


reply via email to

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