Bug#537369: libc6: Theoretically possible malloc failure causing the only arena to remain locked
Package: libc6
Version: 2.7-18
Severity: normal
While developing mallocpool (https://sourceforge.net/projects/mallocpool/) I've had the
opportunity to try various configuration options for my reworking of malloc.c, such as
not using arenas.
In malloc.c this is defined as "the same as HAVE_MMAP" so that's set to 0 as well, to
perform some simple tests.
I realise that the glibc used in Debian is built with WAVE_MMAP and USE_ARENAS set to 1
but if some embedded system comes along where this isn't true then there may well be a
problem.
This happens in __libc_malloc in the event of an allocation failure.
The attached patch fixes the problem.
-- System Information:
Debian Release: 5.0.2
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libc6 depends on:
ii libgcc1 1:4.3.2-1.1 GCC support library
libc6 recommends no packages.
Versions of packages libc6 suggests:
pn glibc-doc <none> (no description available)
ii locales 2.7-18 GNU C Library: National Language (
-- debconf information:
glibc/upgrade: true
glibc/restart-failed:
glibc/restart-services:
Reply to: