Skip to content

Add CI TSan workflow #4624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

dloebl
Copy link
Contributor

@dloebl dloebl commented Aug 6, 2025

Attempt at adding a CI TSan workflow. This has a quite a few benefits:

  • Data races or other concurrency issues are caught before they make it in master or a release
  • The suppression file (./suppressions/tsan.supp) is continuously tested

The tests are still failing and there are probably still some false-positives left. Depends on #4623.

@dloebl dloebl marked this pull request as draft August 6, 2025 12:01
@dloebl dloebl force-pushed the add-ci-tsan-workflow branch from 96ce2f6 to cdf6f06 Compare August 6, 2025 12:04
TSAN_DSO=`$CC -print-file-name=libclang_rt.tsan-x86_64.so`
echo "LDSHARED=$CC -shared" >> $GITHUB_ENV
echo "CPPFLAGS=-g -fsanitize=thread -fno-sanitize=function -fno-omit-frame-pointer -fopenmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" >> $GITHUB_ENV
echo "LDFLAGS=-g -fsanitize=thread -shared-libasan -fopenmp=libomp" >> $GITHUB_ENV
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linking fails without -shared-libasan (even for TSan). I'm not sure why that's the case

build: { cc: clang-19, cxx: clang++-19, linker: ld.lld-19, sanitize: true }
build: { cc: clang-19, cxx: clang++-19, linker: ld.lld-19, sanitize: 'asan' }

- name: "Linux x64 (Ubuntu 24.04) - Clang 19 with TSan"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ASan and TSan aren't compatible - so I had to add a new workflow

@dloebl dloebl force-pushed the add-ci-tsan-workflow branch from 116638b to 5de22c4 Compare August 6, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant