Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
On Sat, May 08, 2004 at 05:02:14PM +0200, Vincent Lefevre wrote:
> On 2004-05-08 15:13:40 +0200, Wolfram Gloger wrote:
> > But now concerning the bug report in question: I see no bug. The
> > MAP_NORESERVE does not matter here at all. Note that before malloc
> > hands out memory in a region allocated with MAP_NORESERVE, it _must_
> > call mprotect(..., PROT_READ|PROT_WRITE) on a smaller subregion, and
> > _that_ call definitely should be checked by the kernel against
> > overcommitment accounting, as _then_ (and only then) physical memory
> > really is potentially allocated. I believe this to be the case in
> > Linux.
>
> But mprotect seems to be never called (strace just shows old_mmap
> calls).
Does strace show mapping with PROT_NONE? If so and there's no
mprotect, then I'm quite confused - access should fail.
Does strace even show MAP_NORESERVE? I don't think the mmap call that
you're looking at is even the one which uses MAP_NORESERVE, since in
the copy of glibc source I'm looking at, that's only used for
allocating secondary arenas.
--
Daniel Jacobowitz
Reply to:
- References:
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Vincent Lefevre <vincent@vinc17.org>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Daniel Jacobowitz <dan@debian.org>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Vincent Lefevre <vincent@vinc17.org>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Daniel Jacobowitz <dan@debian.org>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Vincent Lefevre <vincent@vinc17.org>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Daniel Jacobowitz <dan@debian.org>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Vincent Lefevre <vincent@vinc17.org>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Daniel Jacobowitz <dan@debian.org>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Wolfram Gloger <wg@malloc.de>
- Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
- From: Vincent Lefevre <vincent@vinc17.org>