[PATCH v3] x32: Align sem_t to 8 bytes [BZ #33632]

H.J. Lu hjl.tools@gmail.com
Fri Nov 21 00:03:56 GMT 2025


On Fri, Nov 21, 2025 at 8:00 AM Samuel Thibault
<samuel.thibault@aquilenet.fr> wrote:
>
> H.J. Lu, le ven. 21 nov. 2025 07:53:34 +0800, a ecrit:
> > On Wed, Nov 19, 2025 at 8:44 PM Adhemerval Zanella Netto
> > <adhemerval.zanella@linaro.org> wrote:
> > >
> > >
> > >
> > > On 19/11/25 08:10, Wilco Dijkstra wrote:
> > > > Hi HJ,
> > > >
> > > >>> That's an ABI break. Also I don't see how the behaviour of existing x32 binaries
> > > >>> is unchanged - they use unaligned sem_t and thus reintroduce the bug.
> > > >>
> > > >> The current x32 binaires use 64-bit atomic operations on unaligned
> > > >> 64-bit sem_t.   My patch doesn't change that.   It doesn't reintroduce
> > > >> the bug.
> > > >
> > > > But it doesn't fix it either and it introduces new ABI bugs...
> >
> > There is NO NEW ABI bug.   The size of sem_t is unchanged.  The only
> > change is its alignment.
>
> And thus it changes the ABI of a structure containing a sem_t at a
> previously-unaligned place.

Yes, it is true.  I will submit a new patch.

-- 
H.J.


More information about the Libc-alpha mailing list