This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix BZ#16374 -- don't use mmap for FILE buffers
- From: Florian Weimer <fweimer at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at gmail dot com>, GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Mon, 16 Feb 2015 19:32:24 +0100
- Subject: Re: [patch] Fix BZ#16374 -- don't use mmap for FILE buffers
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobNomWyxd9Oz3=kHq0vyBpmfxSyj_cFBxyahCJSs1cZBzQ at mail dot gmail dot com>
On 02/16/2015 07:06 PM, Paul Pluzhnikov wrote:
> Greetings,
>
> I believe we've reached a consensus in
> https://sourceware.org/ml/libc-alpha/2015-02/msg00010.html -- using
> mmap to allocate FILE buffers is really not a good idea.
>
> Attached patch replaces mmap()s with calloc()s.
Why is calloc needed? The implementation needs to keep track of the
active buffer range anyway, and the old fallback code had just a malloc
AFAICS.
--
Florian Weimer / Red Hat Product Security