On 11 Oct 2013, at 00:22, Eric Blake wrote:

> 
> Why impose an arbitrary recursion limit at all? [..]
> One way to do this is to link to the GNU libsigsegv library [..]
> (although gracefully recovering from overflow is a MUCH harder task [..]).

 I personally do not mind linking with libsigsegv, if you can ensure that it 
will be present on all platforms bash runs, and if you provide some other mean 
to avoid going into infinite recursion (like #ifndef HAVE_LIB_SIGSEGV /*use 
hardcoded recursion limit*/ #endif) in case you do not have the lib.
 If you prefer, I can, according to the gnu philosophers (as you say), add a 
limit that will equal with the amount of function frames that can fit available 
memory :) to let you use the full power and explore the mysteries of infinite 
recursions :)
 Anyway, the patch was just a thought; I think that it is a good practice to 
avoid this kind of situations, especially when you are implementing a command 
that can define other commands, including itself, i.e., can be recursive in 
itself.

cheers,
pg


Reply via email to