This is the mail archive of the glibc-bugs@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]

[Bug stdio/20200] dprintf unconditionally calls malloc


https://sourceware.org/bugzilla/show_bug.cgi?id=20200

--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Carlos O'Donell from comment #3)
> (In reply to Florian Weimer from comment #2)
> > (In reply to Carlos O'Donell from comment #1)
> > > Note that dprintf need not be AS-safe, POSIX doesn't mandate it, and we
> > > don't document any safety standard for it in the glibc manual, nor in the
> > > linux man pages project. The original author of the interface (Roland
> > > McGrath) has stated that he intended it to be AS-safe, but we don't know if
> > > that's even possible today.
> > > 
> > > I don't quite understand why this is filed as a distinct bug from bug 16060?
> > 
> > It's a regression in 2.23.  It's fix probably will not address the other
> > issues in bug 16060.
> 
> What's the regression?

Before, you could call dprintf from a signal handler, interrupting malloc, and
it would work if the format string was reasonable (no self-deadlock).  After
the change to use malloc for the temporary buffer instead of mmap, you end up
with a self-deadlock.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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