Chet Ramey <chet@nike.ins.cwru.edu> 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
bug.
paul