Re: [PATCH 3/6] posix: Use malloc instead of alloca for the glob user name

Collin Funk <[email protected]> Wed, 05 Aug 2026 18:42:13 -0700
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
Adhemerval Zanella <[email protected]> writes:

> Use malloc unconditionally.  The name is only needed for the passwd
> lookup that follows, which is far more expensive than the allocation.
>
> Checked on x86_64-linux-gnu, aarch64-linux-gnu, and i686-linux-gnu.
> ---
>  posix/glob.c | 16 +++++-----------
>  1 file changed, 5 insertions(+), 11 deletions(-)

Looks good.

It annoys me slightly that we use "int" instead of "bool" there, but
that is separate from your patches. :)

Reviewed-by: Collin Funk <[email protected]>

Collin