From 10b48c623d386c2f77c7e43557bf1dfddded4199 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 20 Oct 2023 23:32:49 +0200 Subject: [PATCH] Fix tsan tests. 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. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6f569e42a..b0b3a7c83e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: