[PATCH v3] Revert __HAVE_64B_ATOMICS configure check

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Fri Nov 14 16:29:25 GMT 2025



On 14/11/25 12:39, Florian Weimer wrote:
> * Adhemerval Zanella Netto:
> 
>> On 14/11/25 10:44, Wilco Dijkstra wrote:
>>> Hi Adhemerval,
>>>
>>>> - Enable USE_64B_ATOMICS for x32.
>>>
>>> That's incorrect. There is no guarantee that unaligned accesses are
>>> atomic even on x86.
>>
>> I tend to agree, but this was it was historical done and I prefer to
>> *not* change now (and H.J already raised this as well).
>>
>> I think it would be better to disable a 64-bit atomic on x32 on a
>> subsequent patch with a explanation on where it fails (since now
>> x32 glibc deployments are using it anyway).
> 
> There's always space for a naturally aligned 8-byte quantity in current
> sem_t.  I think this is fixable without an ABI bump, it's just ugly.

And there is also the question whether fixing this on the affected ABIs
really pays off the complexity that it would add.

> 
> We can probably assume that external uses of semaphores via sem_init are
> fully aligned, so that the alignment step does not alter the
> interpretation of frozen sem_t values.
> 
> Thanks,
> Florian
> 



More information about the Libc-alpha mailing list