Skip to content

Commit

Permalink
Fix tsan tests.
Browse files Browse the repository at this point in the history
from [this](https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html#threadsanitizer)

> To work correctly ThreadSanitizer needs to be "aware" of all synchronization operations in a program. It generally achieves that through \[...\] and compile time instrumentation (e.g. atomic operations). Using it without instrumenting all the program code can lead to false positive reports.

and the example uses -Zbuild-std ... of course, std has to be instrumented. Adding -Zbuild-std fixes it, indeed.
  • Loading branch information
Dirbaio committed Oct 20, 2023
1 parent 199a8d8 commit 10b48c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ jobs:
with:
use-cross: false
command: test
args: --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
args: -Zbuild-std --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1

# Run cfail tests on MSRV
testcfail:
Expand Down

0 comments on commit 10b48c6

Please sign in to comment.