tsan c++ and rust configurations - #7214
Conversation
|
@mikea Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
485397f to
2a2d699
Compare
|
I'm Bonk, and I've done a quick review of your PR. Adds C++ and Rust ThreadSanitizer build configurations and an instrumented Rust standard library.
|
There was a problem hiding this comment.
🟡 Changes recommended
The Rust toolchain omits rustc’s required codegen backend, and the test hard-codes main-repository runfile paths.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds Linux x86_64 TSan support across C++ and Rust, including an instrumented Rust standard library and integration test.
Changes:
- Adds sanitizer platforms and Bazel configurations.
- Builds a TSan-instrumented Rust standard library and toolchain.
- Adds V8 compatibility patch and race-detection test.
File summaries
| File | Description |
|---|---|
.bazelrc |
Configures ASan/TSan builds. |
build/deps/rust.MODULE.bazel |
Exposes nightly Rust tools and sources. |
build/deps/v8.MODULE.bazel |
Registers the V8 TSan patch. |
build/platforms/BUILD.bazel |
Defines sanitizer constraints and platforms. |
build/rust/BUILD.bazel |
Defines the custom TSan Rust toolchain. |
build/rust/build_std.bzl |
Implements instrumented standard-library rules. |
build/rust/build_std.sh |
Builds and stages instrumented Rust libraries. |
patches/v8/0041-Fix-TSan-build-without-the-V8-sandbox.patch |
Guards sandbox-only V8 handling. |
src/rust/tsan-test/BUILD.bazel |
Declares the TSan integration test. |
src/rust/tsan-test/race.rs |
Provides a deliberate Rust data race. |
src/rust/tsan-test/verify.sh |
Validates instrumentation and race reporting. |
Review details
Suppressed comments (1)
src/rust/tsan-test/verify.sh:11
- This second
_mainpath has the same external-repository failure: under a parent Bazel workspace it does not resolve the:racerunfile. Resolve it throughTEST_WORKSPACEinstead.
race="$TEST_SRCDIR/_main/src/rust/tsan-test/race"
- Files reviewed: 11/11 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
f1d93d4 to
da9d022
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Nightly updates can create mismatched compiler sources, and the integration test is not exercised by CI.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 16/16 changed files
- Comments generated: 3
- Review effort level: Balanced
da9d022 to
e420e4d
Compare
e420e4d to
c54e195
Compare
borrows the idea of recent build-std change downstream to build tsan-instrumented rust stdlib.