[lttng-dev] TSAN build broken on master branch

Ondřej Surý via lttng-dev <[email protected]>
Newsgroups org.lttng.lists.lttng-dev
Message-ID <[email protected]>
Hi,

I've updated to the latest HEAD and compilation with clang-16 and clang-17 and

./configure --enable-compiler-atomic-builtins --disable-legacy-mb

It fails with:

rculfhash.c:1189:2: error: address argument to atomic operation must be a pointer to integer ('typeof (node_next)' (aka 'struct cds_lfht_node **') invalid)
        uatomic_or_mo(node_next, REMOVED_FLAG, CMM_RELEASE);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/urcu/uatomic/builtins-generic.h:123:10: note: expanded from macro 'uatomic_or_mo'
                (void) __atomic_or_fetch(cmm_cast_volatile(addr), mask, \
                       ^                 ~~~~~~~~~~~~~~~~~~~~~~~
rculfhash.c:1440:3: error: address argument to atomic operation must be a pointer to integer ('typeof (fini_bucket_next)' (aka 'struct cds_lfht_node **') invalid)
                uatomic_or(fini_bucket_next, REMOVED_FLAG);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/urcu/uatomic/builtins-generic.h:130:2: note: expanded from macro 'uatomic_or'
        uatomic_or_mo(addr, mask, CMM_RELAXED)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/urcu/uatomic/builtins-generic.h:123:10: note: expanded from macro 'uatomic_or_mo'
                (void) __atomic_or_fetch(cmm_cast_volatile(addr), mask, \
                       ^                 ~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

It works with gcc-12, so it seems that clang has stricter rules here.

Ondřej
--
Ondřej Surý (He/Him)
[email protected]

_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.