[PATCH] Add missing pthread_condattr_{init, destroy} stubs to libc

Daniel Eischen eischen at vigrid.com
Fri Nov 27 21:32:05 UTC 2009


On Nov 27, 2009, at 2:14 PM, Joe Marcus Clarke <marcus at freebsd.org>  
wrote:

> On Fri, 2009-11-27 at 15:12 +0200, Kostik Belousov wrote:
>> On Fri, Nov 27, 2009 at 12:15:18AM -0500, Joe Marcus Clarke wrote:
>>> I would like permission to commit this patch which adds missing
>>> pthread_condattr_{init,destroy} symbols to libc.  I think I did the
>>> symbol addition correctly (and it seems to work).  Without this, the
>>> weak symbols added in the libpthread-stubs port conflict with  
>>> those in
>>> libthr, and applications with use these symbols can crash.
>>>
>>> I have temporarily hacked libpthread-stubs to fix this, but I really
>>> feel these stubs should be added to libc.  I've also copied kib as  
>>> he
>>> has been kind enough to review my work in the past.  Thanks.
>>>
>>> http://www.marcuscom.com/downloads/stubs.diff
>>
>> It is FBSD_1.2 version that we use for symbols added after HEAD  
>> become
>> CURRENT-9.
>
> Done.

I don't think the symbols belong in FBSD_1.2.  They already exist in  
libthr in a previous namespace.  If you use FBSD_1.2, then you  
probably need to bump them in libthr and libc_r, and add compatible  
symbols (no problem there since there are no differences) for the  
previous versions.

Still not sure why libc needs all libpthread stubs.  Shouldn't be  
necessary.

--
DE


More information about the freebsd-threads mailing list