On Sat, Nov 20, 2021 at 04:26:13PM +0100, Dominik Vogt wrote:
> I wonder if we should do something about these kind of functions:
> Theres the definition "MAX_FUNCTION_DEPTH 512" in defaults.h that
> prevents functions from nesting infinitely deep:

Yeah.  How likely is this problem in the real world though?  As in, how many
people have actually done this?  I can't say I've ever had to support a user
who has managed to get into this situation.

Even then, what's wrong in just keeping it as it is?

> I could add an execution counter that limits the total number of
> command lines that can be executed from a single top level
> function call; maybe limit that to 1000.

Maybe, if this is an actual problem...

> Another problem:  It's possible to add items to functions that are
> currently in use.
>   addtofunc foo i bar
>   addtofunc bar i addtofunc foo i bar
>   # hangs:
>   foo

I can maybe foresee this situation arising.  Maybe this is worth fixing?


Reply via email to