Andrej Shadura wrote in <20190718153028.18791-1-andrew.shadura@collabora\ .co.uk>: |From: Chris Lamb <lamby@xxxxxxxxxx> | |Bug-Debian: https://bugs.debian.org/579815 |Signed-off-by: Chris Lamb <lamby@xxxxxxxxxx> |Signed-off-by: Andrej Shadura <andrew.shadura@xxxxxxxxxxxxxxx> ... |+static int evalcount; /* number of nested evalfun calls */ ... |+ if (evalcount++ >= MAX_RECURSION) |+ sh_error("Maximum function recursion depth (%d) \ ... |+#define MAX_RECURSION 1000 /* maximum recursion level */ A couple of years ago i discovered mksh was crashing due to not having such a limit, and in the discussion which started with Thorsten (the mksh developer) it became obvious that a then-new bash seemed to have stopped using a limit; Thorsten's point was that the real limit can only be artitificial or very costly (if i recall correctly). By then i sent Mr. Xu a message in private with i think a summary of all that, but never got any response. I know that the Lua scripting language seems be in the process of introducing such a limit with the upcoming release. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)