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

Carlos O'Donell carlos@redhat.com
Tue Aug 30 14:18:33 GMT 2022


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.

-- 
Cheers,
Carlos.

[1] https://sourceware.org/libabigail/



More information about the Libc-alpha mailing list