On 5/4/19 7:56 AM, Ole Tange wrote:
>> You've obviously overlooked the FUNCNEST variable and its effects,
>
> I tried with FUNCNEST:
>
> $ FUNCNEST=1
> $ re() { t=$((t+1)); if [[ $t -gt 800 ]]; then echo foo; return;
> fi; re; }; re
> Warning: Program '/bin/bash' crashed.
>
> So eve
On Fri, Apr 19, 2019 at 3:16 PM Chet Ramey wrote:
> On 4/19/19 4:21 AM, Ole Tange wrote:
> > Reading https://www.gnu.org/prep/standards/standards.html#Semantics
> >
> > """Avoid arbitrary limits on the length or number of any data
> > structure, including file names, lines, files, and symbols, by
On 4/19/19 4:21 AM, Ole Tange wrote:
>
> Reading https://www.gnu.org/prep/standards/standards.html#Semantics
>
> """Avoid arbitrary limits on the length or number of any data
> structure, including file names, lines, files, and symbols, by
> allocating all data structures dynamically."""
>
> Y
On 4/19/19 9:16 AM, Chet Ramey wrote:
> You've obviously overlooked the FUNCNAME variable
Sorry, `FUNCNEST' variable. Muscle memory.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.edu
On Fri, Apr 19, 2019 at 10:21:00AM +0200, Ole Tange wrote:
> Of course it is up to you, but if the current behaviour is a
> controlled exit working the way it was designed, I find it odd that
> there is no mention of it in the docs.
Functions may be recursive. The FUNCNEST variable may be
On Fri, Apr 12, 2019 at 7:18 PM Andrew Church wrote:
>
> >This recursive function causes bash to segfault:
> >
> >$ re() { t=$((t+1)); if [[ $t -gt 800 ]]; then echo foo; return;
> >fi; re; }; re
> >Segmentation fault (core dumped)
> >
> >Ideally Bash ought to run out of memory before this fai
On 4/12/19 12:12 PM, Andrew Church wrote:
>> This recursive function causes bash to segfault:
>>
>> $ re() { t=$((t+1)); if [[ $t -gt 800 ]]; then echo foo; return;
>> fi; re; }; re
>> Segmentation fault (core dumped)
>>
>> Ideally Bash ought to run out of memory before this fails. But an
>> ac
>This recursive function causes bash to segfault:
>
>$ re() { t=$((t+1)); if [[ $t -gt 800 ]]; then echo foo; return;
>fi; re; }; re
>Segmentation fault (core dumped)
>
>Ideally Bash ought to run out of memory before this fails. But an
>acceptable solution could also be to say 'stack overflow'.
This recursive function causes bash to segfault:
$ re() { t=$((t+1)); if [[ $t -gt 800 ]]; then echo foo; return;
fi; re; }; re
Segmentation fault (core dumped)
Ideally Bash ought to run out of memory before this fails. But an
acceptable solution could also be to say 'stack overflow'.
$ bash