-
Nils Goroll authored
To allow dynamic SUB calls, we need to check for recursions at runtime, reflecting the compile time recursion check. We create a bitmask to note each dynamically called SUB by its unique number. To check for recursions, we only need to test if the respective bit for the sub number is already set. We only conduct this check if the track_call argument of vcl_call_method() is true. By setting this argument to the number of SUB references, we enable call tracking only for VCLs with dynamic SUB references (when (struct VCL_conf).nsub is non-zero). VCC already guarantees that static calls are loop free - so loops can only be introduced through dynamic SUB references. Call tracking with a bitmask was suggested by phk