[PATCH v2][malloc] Use relaxed atomics for malloc have_fastchunks
Joseph Myers
joseph@codesourcery.com
Tue Oct 17 23:08:00 GMT 2017
I think this breaks the build for tilepro. You're using atomic operations
on a bool field, and tilepro only supports atomic operations on 4-byte
objects and gives errors for other sizes. Generic code should only use
atomics on int-size / pointer-size objects unless it knows the particular
architecture supports atomics of other sizes (e.g. through
__HAVE_64B_ATOMICS).
In file included from ../include/atomic.h:50:0,
from malloc.c:216:
malloc.c: In function 'malloc_init_state':
../sysdeps/tile/tilepro/atomic-machine.h:72:7: error: call to '__atomic_error_bad_argument_size' declared with attribute warning: bad sizeof atomic argument [-Werror]
__atomic_error_bad_argument_size (); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/tile/tilepro/atomic-machine.h:78:3: note: in expansion of macro '__atomic_update'
__atomic_update ((mem), 0, (newvalue))
^~~~~~~~~~~~~~~
../sysdeps/tile/tilepro/atomic-machine.h:94:40: note: in expansion of macro 'atomic_exchange_acq'
#define atomic_store_relaxed(mem, val) atomic_exchange_acq (mem, val)
^~~~~~~~~~~~~~~~~~~
malloc.c:1818:3: note: in expansion of macro 'atomic_store_relaxed'
atomic_store_relaxed (&av->have_fastchunks, false);
^~~~~~~~~~~~~~~~~~~~
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list