From: Rich Felker <dalias@aerifal.cx>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: "Roland McGrath" <roland@hack.frob.com>,
"Ondřej Bílka" <neleai@seznam.cz>,
libc-alpha@sourceware.org
Subject: Re: [PATCH][BZ #12847] dprintf/vdprintf can cause fork to fail (child process crash)
Date: Wed, 25 Sep 2013 21:30:00 -0000 [thread overview]
Message-ID: <20130925212954.GQ20515@brightrain.aerifal.cx> (raw)
In-Reply-To: <Pine.LNX.4.64.1309251935010.31429@digraph.polyomino.org.uk>
On Wed, Sep 25, 2013 at 07:38:40PM +0000, Joseph S. Myers wrote:
> On Wed, 25 Sep 2013, Roland McGrath wrote:
>
> > > If so, since dprintf is not required to be AS-safe,
> > > should it just be filed like a wishlist item?
> >
> > Sure. Though, as the sole inventor of dprintf many years before it was
> > standardized, I can say authoritatively that it was always the intent that
> > it not have any more entanglements (i.e. potential failure modes) than
> > stack use and calling write. (That was never exactly true in the face of
> > user-defined printf extensions, but close enough.)
>
> There are plenty of cases where the underlying printf code uses malloc if
> it needs an allocation too large for alloca (and the cut-off, or how such
> allocations relate to the arguments passed to dprintf, is not as far as I
> know considered a public interface to glibc).
Indeed, I was going to say the same thing. So I'm not clear on whether
the bug report should be "dprintf fails to be AS-safe" or "dprintf
unnecessarily takes open file list lock and adds/removes temporary
FILE objects to it". In the former case, fixing the "bug" will be a
lot more work. In the latter case, I don't think it's really
user-visible.
Rich
next prev parent reply other threads:[~2013-09-25 21:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-21 19:13 Ondřej Bílka
2013-09-21 19:45 ` Rich Felker
2013-09-21 20:23 ` Ondřej Bílka
2013-09-21 21:42 ` Rich Felker
2013-09-24 21:03 ` Roland McGrath
2013-09-24 21:35 ` Rich Felker
2013-09-25 18:03 ` Roland McGrath
2013-09-25 19:38 ` Joseph S. Myers
2013-09-25 20:07 ` Roland McGrath
2013-09-25 21:30 ` Rich Felker [this message]
2013-10-11 13:17 ` Ondřej Bílka
2013-10-17 14:40 ` [PING][PATCH][BZ " Ondřej Bílka
2013-10-17 19:32 ` Rich Felker
2013-11-05 15:14 ` [PING^2][PATCH][BZ " Ondřej Bílka
2013-11-05 18:56 ` Rich Felker
2013-11-05 18:58 ` Ondřej Bílka
2014-01-11 12:53 ` [PING^3][PATCH][BZ " Ondřej Bílka
2014-02-08 0:38 ` [PING^4][PATCH][BZ " Ondřej Bílka
2014-02-08 4:53 ` [PATCH][BZ " Rich Felker
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=20130925212954.GQ20515@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=neleai@seznam.cz \
--cc=roland@hack.frob.com \
/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).