This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #12847] dprintf/vdprintf can cause fork to fail (child process crash)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]