[RFC v1] libio/: Add [v]aprintf()
Alejandro Colomar
alx@kernel.org
Tue Mar 17 20:22:12 GMT 2026
Hi Adhemerval,
On 2026-03-17T16:56:24-0300, Adhemerval Zanella Netto wrote:
> > - aprintf(3), by returning the newly allocated pointer, allows using
> > [[gnu::malloc(free)]], which would improve static analysis, being
> > able to detect leaks, double-free's, and other related bugs.
>
> I would say this the only compelling reason to provide this symbol,
I agree this is the most objective reason.
> >> I don't have a strong opinion about this, albeit since gnulib is already
> >> providing and that committee has shown interest I would way for C standard
> >> inclusion.
> >
> > I don't think we want that. The committee is bad at choosing names, and
> > would probably end up choosing a bad name. Now that we're in time to
> > pick a name before the committee decides, we should do it, and then tell
> > the committee about it so that it uses the same name.
> >
> > In fact, gnulib added it as aprintf(3) precisely for that reason.
>
> I would refrain to make this kind of judgement ("bad at choosing
> names") because it only adds contention on discussing a technical
> inclusion.
Okay.
> Before adding this it would be helpful to hear other maintainers, but
> I inclined to consider this addition.
Sure; let's hear them.
Thanks!
Cheers,
Alex
--
<https://www.alejandro-colomar.es>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260317/31a04213/attachment.sig>
More information about the Libc-alpha
mailing list