On 11/30/2018 05:41 PM, Nick Clifton wrote:
> @@ -4693,10 +4694,21 @@
>  demangle_nested_args (struct work_stuff *work, const char **mangled,
>                        string *declp)
>  {
> +  static unsigned long recursion_level = 0;
>    string* saved_previous_argument;
>    int result;
>    int saved_nrepeats;
>  
> +  if ((work->options & DMGL_RECURSE_LIMIT)
> +      && work->recursion_level > DEMANGLE_RECURSION_LIMIT)
> +    {
> +      /* FIXME: There ought to be a way to report that the recursion limit
> +      has been reached.  */
> +      return 0;
> +    }
> +
> +  recursion_level ++;
> +

There's still a static recursion level counter here?

Thanks,
Pedro Alves

Reply via email to