[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#226511: without linuxthreads, malloc locking routines do not work on hppa



On Tue, Jan 06, 2004 at 10:57:41PM -0500, Carlos O'Donell wrote:
> Package: glibc
> Version: 2.3.2.ds1-10
> Severity: important
> 
> malloc's arena locking routines in glibc rely on simple locking
> functions that assume lock taken is 1 and lock released is 0.
> This is not the case for hppa, the architecture has only one
> primitive locking instruction ldcw (load and clear word).
> 
> Any program using malloc and not linking linuxthreads may be prone
> to livelock when malloc has to increase arena size. Other scenarios
> include locking an object, followed by dlopen'ing libpthread, and
> attempting to manipulate the lock after the dlopen.
> 
> On hppa this can cause squid to lockup at start or when creating cache
> directories.
> 
> The solution was presented upstream, and accepted. Malloc now has
> per-arch locking functions that can be overriden with malloc-machine.h.
> hppa upstream provides its own implementation of malloc-machine.h
> 
> This removes "bug-iconv3" from the testsuite failures for hppa.
> 
> The solution is to integrate upstream changes for:
> 
> libc/linuxthreads/sysdeps/pthread/malloc-machine.h
> libc/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h
> libc/nptl/sysdeps/pthread/malloc-machine.h
> libc/sysdeps/generic/malloc-machine.h
> libc/sysdeps/mach/hurd/malloc-machine.h
> 
> and libc/malloc/*

A patch against our current version, please.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: