Integrate Clang ThreadSanitizer in tests#1986
Open
3manifold wants to merge 2 commits intoOpenNMT:masterfrom
Open
Integrate Clang ThreadSanitizer in tests#19863manifold wants to merge 2 commits intoOpenNMT:masterfrom
3manifold wants to merge 2 commits intoOpenNMT:masterfrom
Conversation
f36080f to
f5cecc4
Compare
3manifold
commented
Feb 4, 2026
| env: | ||
| CT2_USE_MKL: 1 | ||
| run: | | ||
| TSAN_OPTIONS="ignore_noninstrumented_modules=1:halt_on_error=1" tests/ctranslate2_test tests/data |
Contributor
Author
There was a problem hiding this comment.
ignore_noninstrumented_modules flag which makes ThreadSanitizer ignore all interceptors called from the given set of (non-instrumented) libraries
https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual#non-instrumented-code
This avoids false positives coming mostly from OpenMP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Integrate TSAN similarly to #1903
resolves #1987
P.S. To avoid confusion with earlier PRs, #1993 had incorrect title; the correct one should be "Use LLVM
ThreadSanitizerAddressSanitizer instead of Google".Test case
One can introduce a race condition to test
tsanby modifyinginclude/ctranslate2/ops/mul.hand run tests again. That is: