On Thu, Nov 12, 2026 at 09:48:11AM +0100, Jakub Jelinek wrote:
> On Thu, Nov 12, 2026 at 09:33:00AM +0100, Stefan Schulze Frielinghaus wrote:
> > On Thu, Nov 12, 2026 at 09:01:03AM +0100, Jakub Jelinek wrote:
> > > On Thu, Nov 12, 2026 at 08:33:55AM +0100, Stefan Schulze Frielinghaus
> > > wrote:
> > > > On Wed, Nov 11, 2026 at 12:17:58PM +0100, Jakub Jelinek wrote:
> > > > > Hi!
> > > > >
> > > > > This series does the usual annual update of libsanitizer from
> > > > > upstream.
> > > > >
> > > > > I've tested this on x86_64-linux so far, but wonder about other
> > > > > arches.
> > > >
> > > > Bootstrap and regtest are successful on s390 for (z17,z14,z13,z900).
> > > > However, at first I was happy to see that
> > > >
> > > > FAIL: c-c++-common/tsan/tls_race.c -O0 output pattern test
> > > > FAIL: c-c++-common/tsan/tls_race.c -O2 output pattern test
> > > >
> > > > were gone when comparing test_summary outputs, and I thought this is
> > > > because
> > > > https://github.com/llvm/llvm-project/commit/fc48fac95b8b1bad161c705dd4bf71300bd2b609
> > > > is included, now. However, I cannot find in any test log file a
> > > > corresponding PASS entry. Running
> > >
> > > On x86_64 with the 4 patches I certainly see
> > > grep ^PASS.*tls_race gcc.log
> > > PASS: c-c++-common/tsan/tls_race.c -O0 (test for excess errors)
> > > PASS: c-c++-common/tsan/tls_race.c -O0 execution test
> > > PASS: c-c++-common/tsan/tls_race.c -O0 output pattern test
> > > PASS: c-c++-common/tsan/tls_race.c -O2 (test for excess errors)
> > > PASS: c-c++-common/tsan/tls_race.c -O2 execution test
> > > PASS: c-c++-common/tsan/tls_race.c -O2 output pattern test
> > >
> > > Does check_effective_target_fsanitize_thread succeed?
> > > So, basically, if you try to compile/assemble/link a trivial int main ()
> > > {}
> > > with -fsanitize=thread and run it, does that work?
> >
> > Ahh, nice catch. I'm seeing quite a few
> >
> > /usr/bin/ld.bfd:
> > /home/stefansf/gcc-verify-workdir/build/s390x-ibm-linux-gnu/./libsanitizer/tsan/.libs/libtsan.so:
> > undefined reference to `__sync_fetch_and_and_16'
> > /usr/bin/ld.bfd:
> > /home/stefansf/gcc-verify-workdir/build/s390x-ibm-linux-gnu/./libsanitizer/tsan/.libs/libtsan.so:
> > undefined reference to `__sync_lock_test_and_set_16'
> > /usr/bin/ld.bfd:
> > /home/stefansf/gcc-verify-workdir/build/s390x-ibm-linux-gnu/./libsanitizer/tsan/.libs/libtsan.so:
> > undefined reference to `__sync_fetch_and_or_16'
> > /usr/bin/ld.bfd:
> > /home/stefansf/gcc-verify-workdir/build/s390x-ibm-linux-gnu/./libsanitizer/tsan/.libs/libtsan.so:
> > undefined reference to `__sync_fetch_and_sub_16'
> > /usr/bin/ld.bfd:
> > /home/stefansf/gcc-verify-workdir/build/s390x-ibm-linux-gnu/./libsanitizer/tsan/.libs/libtsan.so:
> > undefined reference to `__sync_val_compare_and_swap_16'
> > /usr/bin/ld.bfd:
> > /home/stefansf/gcc-verify-workdir/build/s390x-ibm-linux-gnu/./libsanitizer/tsan/.libs/libtsan.so:
> > undefined reference to `__sync_fetch_and_xor_16'
> > /usr/bin/ld.bfd:
> > /home/stefansf/gcc-verify-workdir/build/s390x-ibm-linux-gnu/./libsanitizer/tsan/.libs/libtsan.so:
> > undefined reference to `__sync_fetch_and_add_16'
>
> Ah, so likely we need to link libtsan.so against -latomic now? Wonder if
> only on s390x or various other arches. I don't see any such references on
> x86_64 though.
> Any idea what exact changes caused this and in which TUs?
I'm seeing now:
libsanitizer/tsan/.libs/tsan_interface_atomic.o: U
__sync_fetch_and_and_16
> We don't have
> dependencies = { module=all-target-libsanitizer; on=all-target-libatomic; };
> right now, nor install dependency.
>
> Jakub
>