sanitizers: Stabilize AddressSanitizer and LeakSanitizer#123617
sanitizers: Stabilize AddressSanitizer and LeakSanitizer#123617rcvalle wants to merge 4 commits into
Conversation
|
rustbot has assigned @compiler-errors. Use |
|
Some changes occurred in src/tools/compiletest cc @jieyouxu These commits modify compiler targets. |
|
r? @davidtwco |
This comment has been minimized.
This comment has been minimized.
compiler-errors
left a comment
There was a problem hiding this comment.
I'd like to see tests that exercise things like -Csanitizer=non-existent and -Zsanitizer=non-existent, and also -Zsanitizer=stable-sanitizer1 (e.g. an x86_64-unknown-linux-gnu test for a stable sanitizer) and -Csanitizer=unstable-sanitizer (I believe you can add a run-make test with a custom target that has no sanitizers enabled for it?)
Footnotes
-
What do we do if we pass
-Zsanitizerwith a stable sanitizer? Should we error? Presumably not, but I would assume we'd want to at least warn the users that the sanitizer has been stabilized and they should be using-C, just like we do for feature gates. ↩
|
Documentation will need an update. Is something like |
|
This is unusable to most stable Rust users, right? It requires either |
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
cec660e to
17eff53
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
17eff53 to
f81f25d
Compare
This comment has been minimized.
This comment has been minimized.
f81f25d to
2cfed6e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Add suppport for specifying stable sanitizers in addition to the existing supported sanitizers.
Stabilize AddressSanitizer and LeakSanitizer for the Tier 1 targets that support them.
Stabilize AddressSanitizer for the new x86_64_unknown_linux_gnuasan Tier 2 target which provides a precompiled Rust Standard Library with it enabled by default.
Stabilization ReportSummaryWe would like to propose stabilizing AddressSanitizer and LeakSanitizer for the Tier 1 targets that support them. This will be done by
After stabilizing these sanitizers, the supported sanitizers will look like this:
The tracking issue for stabilizing the sanitizers is #123615. This is part of our work to stabilize support for sanitizers in the Rust compiler. (See our roadmap at https://hackmd.io/@rust-exploit-mitigations-pg/Sk6SB1eP-l.) DocumentationDocumentation will be updated by adding documentation for the TestsYou may find current and will find additional test cases for the sanitizers in:
|
|
I rebased this PR and resolved all merge conflicts, and it should be ready to review and merge. It also now also stabilizes AddressSanitizer for the new x86_64-unknown-linux-gnuasan Tier 2 target, which provides a precompiled Rust Standard Library with these enabled by default, as discussed and proposed in the MCP (zulip, MCP). This is work provides the support for and is being continued by @jakos-sec in the Stabilize MemorySanitizer and ThreadSanitizer Support project goal (which is a continuation of Propose a 2025H2 goal for sanitizer stabilization). See the Tracking Issue for stabilizing the sanitizers (e.g., AddressSanitizer, LeakSanitizer, MemorySanitizer, ThreadSanitizer) for more information about it and implementation history. |
View all comments
Add support for specifying stable sanitizers in addition to the existing supported sanitizers, remove the
-Zsanitizerunstable option and have only the-Csanitizecodegen option, requiring the-Zunstable-optionsto be passed for using unstable sanitizers, add AddressSanitizer and LeakSanitizer for the Tier 1 targets that support them, and also stabilize theno_sanitizeattribute so stable sanitizers can also be selectively disabled for annotated functions.. The tracking issue for stabilizing the sanitizers is #123615. This is part of our work to stabilize support for sanitizers in the Rust compiler. (See our roadmap at https://hackmd.io/@rcvalle/S1Ou9K6H6.)Stabilization Report
Summary
We would like to propose stabilizing AddressSanitizer and LeakSanitizer for the Tier 1 targets that support them, and stabilize the
no_sanitizeattribute so stable sanitizers can also be selectively disabled for annotated functions.. This will be done by-Zsanitizerunstable option and having only the-Csanitizecodegen option, and requiring the-Zunstable-optionsto be passed for using unstable sanitizers.no_sanitizeattribute.After stabilizing these sanitizers, the supported sanitizers will look like this:
The tracking issue for stabilizing the sanitizers is #123615. This is part of our work to stabilize support for sanitizers in the Rust compiler. (See our roadmap at https://hackmd.io/@rcvalle/S1Ou9K6H6.)
Documentation
Documentation will be updated by adding documentation for the
-Csanitizercodegen option to the Codegen Options in the The rustc book.Tests
You may find current and will find additional test cases for the sanitizers in:
Unresolved questions
We will prioritize stabilizing sanitizers that provide incremental value without requiring rebuilding the Rust Standard Library (i.e., Cargo build-std feature). We're also working on Partial compilation using MIR-only rlibs compiler-team#738, which should help with
-Zbuild-std.