[PATCH] m68: Enforce 4-byte alignment on internal locks (BZ #29537)

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Aug 30 14:23:25 GMT 2022



On 30/08/22 11:18, Carlos O'Donell wrote:
> On 8/30/22 09:35, Adhemerval Zanella via Libc-alpha wrote:
>> The HPPA also requires a 16-byte alignment for locks, although it is
>> just a historical artifact to keep compatibility with old
>> implementation.
>> ---
>>  sysdeps/nptl/libc-lockP.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h
>> index d3a6837fd2..9efe962588 100644
>> --- a/sysdeps/nptl/libc-lockP.h
>> +++ b/sysdeps/nptl/libc-lockP.h
>> @@ -34,7 +34,7 @@
>>  #include <tls.h>
>>  
>>  /* Mutex type.  */
>> -typedef int __libc_lock_t;
>> +typedef int __libc_lock_t __LOCK_ALIGNMENT;
>>  typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
>>  typedef pthread_rwlock_t __libc_rwlock_t;
>   
> Are you able to verify that this doesn't change the ABI of any other
> structures that might have an internal lock?
> 
> Normally I would use libabigail[1] before and after the patch to look
> for subtype size changes in public ABIs/APIs.
> 

It should not and I would consider this an bug since the header is internal
only and all definitions are used solely on internal code (although 
pthreadtypes-arch.h is an installed header, libc-lockP.h is not).


More information about the Libc-alpha mailing list