Skip to content

Commit a4e8f82

Browse files
committed
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.
1 parent 199a8d8 commit a4e8f82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ jobs:
283283
with:
284284
toolchain: ${{ matrix.toolchain }}
285285
target: ${{ matrix.target }}
286+
components: rust-src
286287
override: true
287288

288289
- name: Export variables
@@ -295,7 +296,7 @@ jobs:
295296
with:
296297
use-cross: false
297298
command: test
298-
args: --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
299+
args: -Zbuild-std --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
299300

300301
# Run cfail tests on MSRV
301302
testcfail:

0 commit comments

Comments
 (0)