Rollup of 7 pull requests - #163358
Closed
JonathanBrouwer wants to merge 33 commits into
Closed
Rollup of 7 pull requests#163358JonathanBrouwer wants to merge 33 commits into
JonathanBrouwer wants to merge 33 commits into
Conversation
For production use, we should only link in the ubsan_minimal runtime, instead of the complete ubsan runtime. This adds support for both cfi-recover and cfi-diag to use the minimal runtime when `-Zsanitizer-cfi-minimal-runtime` is specified. This also includes tests, to ensure the flag can only be used if either cfi-recover or cfi-diag is enabled, it doesn't disrupt the original behavior, and links in the correct runtime when specified. Co-Authored-By: Bastian Kersting <bkersting@google.com>
Co-Authored-By: Bastian Kersting <bkersting@google.com>
Only check `SanitizerCfiMinimalRuntimeRequiresCfiRecoverOrDiag` if CFI is actually enabled. Use `is_sanitizer_cfi_minimal_runtime_enabled()` helper within `link.rs`.
This is a part of the stack-protector work. Adding support for merge-functions is not strictly needed, but it does prevent breakage if the GCC function merging logic changes. Not adding tests for -Z merge-functions since I don't see any such tests for the LLVM side of it.
we can pass it by reference when we have it (loan traversal), and use the one in regioncx's LivenessValues when we don't have it already in scope (MIR dump traversal)
we're really deferring the region liveness computation to become on-demand, "deferred locals" is slightly inaccurate in that some of the local's type data is also necessary for drop-liveness. we can focus on the output of the computation rather than its inputs. it also allows us to rename the suboptimal set of locals `deferred` colliding with `deferred_locals`
rename the various `deferred` to mention locals, now that `DeferredLocals` doesn't use `deferred_locals`
by not calling `compute_relevant_live_locals`: - remove free regions hashset allocation - remove unused boring locals allocation - remove relevant locals vec allocation - directly build relevant locals with nll_boring locals filtering we could also optimize the boring nll locals hashset but it's unclear whether it's worth it compared to when it's being iterated.
…=rcvalle Add support for -Zsanitizer-cfi-minimal-runtime For production use, we should only link in the ubsan_minimal runtime, instead of the complete ubsan runtime. This adds support for both cfi-recover and cfi-diag to use the minimal runtime when `-Zsanitizer-cfi-minimal-runtime` is specified. This also includes tests, to ensure the flag can only be used if either cfi-recover or cfi-diag is enabled, it doesn't disrupt the original behavior, and links in the correct runtime when specified. cc @1c3t3a ?r rcvalle
…ent, r=Urgau [rustdoc] Fix invalid jump to def link when `#[rustc_allow_incoherent_impl]` is involved Fixes rust-lang#163112. Problem here is that the method is not available in the crate where the type is defined. So `def_path` is actually problematic here as it resolves to the end item, which is not what we want. So instead, I made a simplified version of the `rustc_middle::ty::print::pretty::try_print_visible_def_path_recur` function. It's also needed for rust-lang#162808. r? @Urgau
…ol-suggestion-parens, r=estebank Fix suggestion for Option to bool with proper precedence handling Fixes rust-lang#163213
…ogaloo, r=jackh726 More deferred liveness cleanups r? @jackh726 As discussed on zulip as a follow-up to rust-lang#163166, this contains another batch of small cleanups in eager and deferred liveness: - removes the location map Rc that killed our vibe - adds some comments here and there - some renamings like we discussed - also I stole your idea to remove the unnecessary allocations to compute the polonius-relevant deferred locals by stealing the 1 function call in `compute_relevant_live_locals` :3
Member
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 25, 2026
Rollup of 7 pull requests try-job: dist-various-1 try-job: test-various try-job: test-x86_64-gnu-aux try-job: test-x86_64-gnu-llvm-21-3 try-job: test-x86_64-msvc-1 try-job: test-aarch64-apple-1 try-job: test-aarch64-apple-2 try-job: test-x86_64-mingw-1 try-job: test-i686-msvc try-job: test-armhf-gnu
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 25, 2026
…uwer Rollup of 7 pull requests Successful merges: - #162493 (Add support for -Zsanitizer-cfi-minimal-runtime) - #163133 ([rustdoc] Fix invalid jump to def link when `#[rustc_allow_incoherent_impl]` is involved) - #163215 (Fix suggestion for Option to bool with proper precedence handling) - #163266 (More deferred liveness cleanups) - #163274 (Support -Z merge-functions with gcc and add stack-protector asm tests) - #163312 (Add rustdoc regression test for glob import of a crate that re-exports) - #163332 (Add some docs to `Global`)
Contributor
|
💔 Test for de937e7 failed: CI. Failed job:
|
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 4bb4745 failed: CI. Failed job:
|
Contributor
|
PR #162493, which is a member of this rollup, was unapproved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
#[rustc_allow_incoherent_impl]is involved #163133 ([rustdoc] Fix invalid jump to def link when#[rustc_allow_incoherent_impl]is involved)Global#163332 (Add some docs toGlobal)r? @ghost
Create a similar rollup