NetBSD-Bugs archive

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

Re: PR/50087 CVS commit: src/lib/libc/stdlib

On Sun, Aug 09, 2015 at 07:20:00PM +0000, Christos Zoulas wrote:
> The following reply was made to PR port-arm/50087; it has been noted by GNATS.
> From: (Christos Zoulas)
> To:,, 
> Cc: 
> Subject: Re: PR/50087 CVS commit: src/lib/libc/stdlib
> Date: Sun, 9 Aug 2015 15:18:07 -0400
>  On Aug 9,  4:45pm, (Joerg Sonnenberger) wrote:
>  -- Subject: Re: PR/50087 CVS commit: src/lib/libc/stdlib
>  |  This is the wrong approach, IMO. libpthread should not use malloc until
>  |  it knows that libc is fully initialized, not the other way around.
>  This is a problem with libc using malloc the wrong time, not libpthread
>  (due to constructor order). The problem seems to be triggered by the
>  arm arm_initfini.c. I could reproduce this even on x86_64 by adding that
>  file to the libc build.

Oh, that's the use of sysctlbyname, which will internally call the
getoid function and that's caching the result. It should be using fixed
oids to reduce the startup overhead in general.


Home | Main Index | Thread Index | Old Index