From: "Cristian Rodríguez" <cristian@rodriguez.im>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Joe Simmons-Talbott <josimmon@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH v3] vfprintf-internal: Replace alloca with malloc.
Date: Wed, 17 May 2023 14:53:24 -0400 [thread overview]
Message-ID: <CAPBLoAdaXvazFmqZdoATRRdHfn-jf2D3LrogdadAx4PAqnj4Cw@mail.gmail.com> (raw)
In-Reply-To: <8e9beea2-b128-83f1-dead-2c3866e28182@cs.ucla.edu>
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
On Wed, May 17, 2023 at 2:10 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 2023-05-15 11:50, Joe Simmons-Talbott via Libc-alpha wrote:
> > + args_value[cnt].pa_user = malloc (args_size[cnt]);
> > + if (args_value[cnt].pa_user == NULL)
> > + break;
>
> Shouldn't an error be returned if a printf function runs out of memory
> internally?
>
Yes.
>
> Also, that function already uses a scratch buffer; why not grow the
> scratch buffer instead of calling malloc separately?
>
I was going to make the suggestion.. scratch_buffer all things possible
since afair it was built specifically to replace most if not all the
__use_alloca thingies.
next prev parent reply other threads:[~2023-05-17 18:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-15 18:50 Joe Simmons-Talbott
2023-05-17 18:08 ` Paul Eggert
2023-05-17 18:53 ` Cristian Rodríguez [this message]
2023-05-17 19:41 ` Joe Simmons-Talbott
2023-05-17 20:07 ` Paul Eggert
2023-05-17 21:32 ` Joe Simmons-Talbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPBLoAdaXvazFmqZdoATRRdHfn-jf2D3LrogdadAx4PAqnj4Cw@mail.gmail.com \
--to=cristian@rodriguez.im \
--cc=eggert@cs.ucla.edu \
--cc=josimmon@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).