Subject: Re: [PATCH] attr: avoid recursion when expanding attribute macros

From: Junio C Hamano <[email-masked]>
Date: Wed, 12 Nov 2025 09:40:31 -0800

Patrick Steinhardt <[email-masked]> writes:

> That's fair, and as you demonstrate it's easy enough to turn recursion
> into iteration. But it doesn't really solve the main problem: given
> malicious input we'd now still crash eventually, even though we
> ...
> So the evil garbage would continue to be a nuisance for users who want
> to clone such a repository, but now it's going to be more of a nuisance
> for hosting sites given that it could lead to out-of-memory situations.

That assumes there are users who want to clone such a repository
with evil garbage in it, doesn't it?  I am not sure how likely there
exist such people, and even less sure if we want to actively support
such users or discourage them.

I like the conversion from recursion to iteraiton as a general
principle, but somehow I do not think this particular one is an
issue that warrants more than minimum effort on it.

I also wonder how common the use of attribute macros (other than the
built-in ones) are.  Are folks working at hosting sites have easy
access to public data (i.e., super "git grep" that lets them sample
some random subset among many public repositories and work on them)?

Thanks.