Skip to content

Sanitizers target modificators #138736

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

azhogin
Copy link
Contributor

@azhogin azhogin commented Mar 20, 2025

Depends on bool flag fix: #138483.

Some sanitizers need to be target modifiers, and some do not. For now, we should mark all sanitizers as target modifiers except for these: AddressSanitizer, LeakSanitizer

For kCFI, the helper flag -Zsanitizer-cfi-normalize-integers should also be a target modifier.

Many test errors was with sanizer flags inconsistent with std deps. Tests are fixed with -C unsafe-allow-abi-mismatch.

@rustbot
Copy link
Collaborator

rustbot commented Mar 20, 2025

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 20, 2025
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/sanitizers-target-modificators branch from 7526d38 to 0777169 Compare March 20, 2025 12:59
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/sanitizers-target-modificators branch from 0777169 to f454b02 Compare March 24, 2025 08:53
@rustbot rustbot added the PG-exploit-mitigations Project group: Exploit mitigations label Mar 24, 2025
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/sanitizers-target-modificators branch from f454b02 to 509e0b3 Compare March 24, 2025 09:37
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/sanitizers-target-modificators branch from 509e0b3 to 1f20a51 Compare March 24, 2025 11:33
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/sanitizers-target-modificators branch from 1f20a51 to fc95e77 Compare March 24, 2025 13:14
@rust-log-analyzer

This comment has been minimized.

@azhogin azhogin force-pushed the azhogin/sanitizers-target-modificators branch 2 times, most recently from e025a55 to c54dcfc Compare March 24, 2025 13:40
@azhogin azhogin marked this pull request as ready for review March 24, 2025 14:46
@rustbot
Copy link
Collaborator

rustbot commented Mar 24, 2025

Some changes occurred in tests/codegen/sanitizer

cc @rust-lang/project-exploit-mitigations, @rcvalle

Some changes occurred in tests/ui/sanitizer

cc @rust-lang/project-exploit-mitigations, @rcvalle

@bors
Copy link
Collaborator

bors commented Mar 26, 2025

☔ The latest upstream changes (presumably #138974) made this pull request unmergeable. Please resolve the merge conflicts.

@BoxyUwU
Copy link
Member

BoxyUwU commented Mar 26, 2025

r? compiler

@Darksonn
Copy link
Contributor

Do we have any tests that check simultaneous use of multiple sanitizers? For example, if I enable both shadow-call-stack and kcfi at the same time, then both must also be enabled in deps.

@rcvalle rcvalle added the A-sanitizers Area: Sanitizers for correctness and code quality label Apr 10, 2025
@rcvalle
Copy link
Member

rcvalle commented Apr 10, 2025

@rustbot claim

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 7, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request May 8, 2025
…modificators, r=rcvalle

Sanitizers target modificators

Depends on bool flag fix: rust-lang#138483.

Some sanitizers need to be target modifiers, and some do not. For now, we should mark all sanitizers as target modifiers except for these: AddressSanitizer, LeakSanitizer

For kCFI, the helper flag -Zsanitizer-cfi-normalize-integers should also be a target modifier.

Many test errors was with sanizer flags inconsistent with std deps. Tests are fixed with `-C unsafe-allow-abi-mismatch`.
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2025
Rollup of 15 pull requests

Successful merges:

 - rust-lang#138736 (Sanitizers target modificators)
 - rust-lang#140260 (Only prefer param-env candidates if they remain non-global after norm)
 - rust-lang#140523 (Better error message for late/early lifetime param mismatch)
 - rust-lang#140579 (Remove estebank from automated review assignment)
 - rust-lang#140641 (detect additional uses of opaques after writeback)
 - rust-lang#140711 (Do not discard constraints on overflow if there was candidate ambiguity)
 - rust-lang#140716 (Improve `-Zremap-path-scope` tests with dependency)
 - rust-lang#140755 ([win][arm64] Disable various DebugInfo tests that don't work on Arm64 Windows)
 - rust-lang#140756 ([arm64] Pointer auth test should link with C static library statically)
 - rust-lang#140758 ([win][arm64] Disable MSVC Linker 'Arm Hazard' warning)
 - rust-lang#140759 ([win][arm64] Disable std::fs tests that require symlinks)
 - rust-lang#140762 (rustdoc-json: Remove newlines from attributes)
 - rust-lang#140764 (style: Never break within a nullary function call `func()` or a unit literal `()`)
 - rust-lang#140769 (Add `DefPathData::OpaqueLifetime` to avoid conflicts for remapped opaque lifetimes)
 - rust-lang#140773 (triagebot: Better message for changes to `tests/rustdoc-json`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented May 8, 2025

⌛ Testing commit 280dfab with merge 63e001a...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2025
…dificators, r=rcvalle

Sanitizers target modificators

Depends on bool flag fix: rust-lang#138483.

Some sanitizers need to be target modifiers, and some do not. For now, we should mark all sanitizers as target modifiers except for these: AddressSanitizer, LeakSanitizer

For kCFI, the helper flag -Zsanitizer-cfi-normalize-integers should also be a target modifier.

Many test errors was with sanizer flags inconsistent with std deps. Tests are fixed with `-C unsafe-allow-abi-mismatch`.
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 8, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 8, 2025
@GuillaumeGomez
Copy link
Member

Failed CI so let's remove it from the merge queue.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 9, 2025
…t modifiers with custom consistency check function
@azhogin azhogin force-pushed the azhogin/sanitizers-target-modificators branch from 280dfab to f04eb8c Compare May 9, 2025 13:28
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels May 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 9, 2025

This PR modifies run-make tests.

cc @jieyouxu

@azhogin
Copy link
Contributor Author

azhogin commented May 9, 2025

Added //@ compile-flags: -C unsafe-allow-abi-mismatch=sanitizer to the failed tests/ui/sanitizer/thread.rs and also to other tests with needs-sanitizer-support.

@rcvalle
Copy link
Member

rcvalle commented May 9, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented May 9, 2025

📌 Commit f04eb8c has been approved by rcvalle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 9, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request May 10, 2025
…modificators, r=rcvalle

Sanitizers target modificators

Depends on bool flag fix: rust-lang#138483.

Some sanitizers need to be target modifiers, and some do not. For now, we should mark all sanitizers as target modifiers except for these: AddressSanitizer, LeakSanitizer

For kCFI, the helper flag -Zsanitizer-cfi-normalize-integers should also be a target modifier.

Many test errors was with sanizer flags inconsistent with std deps. Tests are fixed with `-C unsafe-allow-abi-mismatch`.
bors added a commit to rust-lang-ci/rust that referenced this pull request May 10, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#129334 (Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`)
 - rust-lang#135015 (Partially stabilize LoongArch target features)
 - rust-lang#138736 (Sanitizers target modificators)
 - rust-lang#139562 (rustdoc: add a handle that makes sidebar resizing more obvious)
 - rust-lang#140151 (remove intrinsics::drop_in_place)
 - rust-lang#140660 (remove 'unordered' atomic intrinsics)
 - rust-lang#140783 (Update documentation of OnceLock::get_or_init.)
 - rust-lang#140789 (Update hermit-abi to 0.5.1)
 - rust-lang#140792 (Use intrinsics for `{f16,f32,f64,f128}::{minimum,maximum}` operations)
 - rust-lang#140862 (Enable non-leaf Frame Pointers for Arm64EC Windows)

r? `@ghost`
`@rustbot` modify labels: rollup
@Zalathar
Copy link
Contributor

Failed in rollup: #140885 (comment)

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 10, 2025
@bors
Copy link
Collaborator

bors commented Jun 13, 2025

☔ The latest upstream changes (presumably #142443) made this pull request unmergeable. Please resolve the merge conflicts.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-sanitizers Area: Sanitizers for correctness and code quality PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants