[PATCH] Revert __HAVE_64B_ATOMICS configure check
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Thu Nov 13 18:29:06 GMT 2025
Hi Adhemerval,
> The 53807741fb44edb8e7c094cb5e7d4ff4e92a6ec1 added a configure check for
> 64-bit atomic operations on some 32-bit ABIs where they were not
> previously enabled. However, at least for s390 [1] and i686, it is not
> fully safe to use 64-bit atomic primitives.
The configure check works fine, including on x86 since it checks that
64-bit types have 64-bit alignment. So it's safe to use.
However the broken cast in sem means that it will go wrong for every 32-bit
architecture since atomics need to be correctly aligned. It's even wrong without
atomics since targets may be strict aligned.
There should be comments that __HAVE_64B_ATOMICS must always be set to 0
for 32-bit targets due to this bug. And a comment on the incorrect cast.
Cheers,
Wilco
More information about the Libc-alpha
mailing list