Re: Segfault after many stackframes

2019-04-19 Thread Ole Tange
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

Re: Segfault after many stackframes

2019-04-19 Thread Greg Wooledge
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

Re: Segfault after many stackframes

2019-04-19 Thread Chet Ramey
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

Re: Segfault after many stackframes

2019-04-19 Thread Chet Ramey
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

mention bind when mentioning inputrc

2019-04-19 Thread 積丹尼 Dan Jacobson
On the man page: Readline Variables Readline has variables that can be used to further customize its behavior. A variable may be set in the inputrc file with a ADD: ^or inspected with the bind command, or set statement of the for