-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 9 pull requests #137506
Closed
Closed
Rollup of 9 pull requests #137506
Conversation
This file contains 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
Fixes rust-lang#111272. With rust-lang#127912 merged, we now have all the infrastructure in place to support stack overflow detection in TLS destructors. This was not possible before because the signal stack was freed in the thread main function, thus a SIGSEGV afterwards would immediately crash. And on platforms without native TLS, the guard page address was stored in an allocation freed in a TLS destructor, so would not be available. rust-lang#127912 introduced the `local_pointer` macro which allows storing a pointer-sized TLS variable without allocation and the `thread_cleanup` runtime function which is called after all other code managed by the Rust runtime. This PR simply moves the signal stack cleanup to the end of `thread_cleanup` and uses `local_pointer` to store every necessary variable. And so, everything run under the Rust runtime is now properly protected against stack overflows.
The specific signal sent by the handler is unreliable when the stack overflow occurs in a TLS destructor. So just don't check the signal code, the only relevant part is that the program doesn't return a success.
…kely to collide with symbol name mangling
As the comment at the top says, this file is not supposed to contain any code. But some has crept in. This commit moves it out.
Fixed issue with usage of generics and moved feature gate to crate root Removed const tag Fixed alphabetical ordering of feature gate, added same to doctest Removed crate-level declaration of feature gate control_flow_into_value Used const_precise_live_drops to constify into_value without issue of a drop
…, r=Amanieu std: detect stack overflows in TLS destructors on UNIX Fixes rust-lang#111272. With rust-lang#127912 merged, we now have all the infrastructure in place to support stack overflow detection in TLS destructors. This was not possible before because the signal stack was freed in the thread main function, thus a SIGSEGV afterwards would immediately crash. And on platforms without native TLS, the guard page address was stored in an allocation freed in a TLS destructor, so would not be available. rust-lang#127912 introduced the `local_pointer` macro which allows storing a pointer-sized TLS variable without allocation and the `thread_cleanup` runtime function which is called after all other code managed by the Rust runtime. This PR simply moves the signal stack cleanup to the end of `thread_cleanup` and uses `local_pointer` to store every necessary variable. And so, everything run under the Rust runtime is now properly protected against stack overflows.
Allow `IndexSlice` to be indexed by ranges. This comes with some annoyances as the index type can no longer inferred from indexing expressions. The biggest offender for this is `IndexVec::from_fn_n(|idx| ..., n)` where the index type won't be inferred from the call site or any index expressions inside the closure. My main use case for this is mapping a `Place` to `Range<Idx>` for value tracking where the range represents all the values the place contains.
…triddle [rustdoc] Add new setting to wrap source code lines when too long Fixes rust-lang#127334. Wrapped lines look like this:  It works in both source code pages and doc pages. You can test it [here](https://rustdoc.crud.net/imperio/code-wrapping/bar/index.html). r? `@notriddle`
…lize, r=Amanieu Stabilize `unbounded_shifts` This stabilizes and const-stabilizes `<iN>::unbounded_shl` and `<uN>::unbounded_shr` from rust-lang#129375.
…hrisDenton Windows: use existing wrappers in `File::open_native` Just a small improvement I've noticed - prevents accidents regarding `SetFileInformationByHandle` parameters. Probably `@ChrisDenton` since we talked about it on discord :)
…Noratrieb Fix documentation for unstable sort on slice Fixes rust-lang#136665
…hlin Tighten `str-to-string-128690.rs``CHECK{,-NOT}`s to make it less likely to incorrectly fail with symbol name mangling The `invoke` to match on to `CHECK` or `CHECK-NOT` (latest master) looks like ```llvm %_0.i.i.i.i.i.i.i.i.i.i.i.i.i1.i = invoke noundef zeroext i1 `@"_ZN42_$LT$str$u20$as$u20$core..fmt..Display$GT$3fmt17ha18033e7fb4f14fcE"(ptr` noalias noundef nonnull readonly align 1 %_3.val.i.i.i.i.i.i.i.i.i.i.i.i.i, i64 noundef %_3.val1.i.i.i.i.i.i.i.i.i.i.i.i.i, ptr noalias noundef nonnull align 8 dereferenceable(64) %formatter.i) to label %bb1.i unwind label %cleanup.i, !noalias !80 ``` in the local `.ll` output. This test incorrectly failed in rust-lang#137483 (comment) due to ``` // CHECK-NOT: {{(call|invoke).*}}fmt ``` matching against the unrelated call ```llvm tail call void `@_RNvNtCseLfmtnDCoTB_5alloc7raw_vec12handle_error` ``` It's not pretty by any means, but... r? `@saethlin`
…ble-control-flow-into-value, r=jhpratt Added into_value function to ControlFlow<T, T>
…, r=compiler-errors Move `impl` blocks out of `rustc_middle/src/mir/syntax.rs` Best reviewed one commit at a time.
@bors r+ rollup=never p=5 |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 24, 2025
Rollup of 9 pull requests Successful merges: - rust-lang#131282 (std: detect stack overflows in TLS destructors on UNIX) - rust-lang#136610 (Allow `IndexSlice` to be indexed by ranges.) - rust-lang#136991 ([rustdoc] Add new setting to wrap source code lines when too long) - rust-lang#137393 (Stabilize `unbounded_shifts`) - rust-lang#137482 (Windows: use existing wrappers in `File::open_native`) - rust-lang#137484 (Fix documentation for unstable sort on slice) - rust-lang#137491 (Tighten `str-to-string-128690.rs``CHECK{,-NOT}`s to make it less likely to incorrectly fail with symbol name mangling) - rust-lang#137495 (Added into_value function to ControlFlow<T, T>) - rust-lang#137501 (Move `impl` blocks out of `rustc_middle/src/mir/syntax.rs`) Failed merges: - rust-lang#137489 (remove `#[rustc_intrinsic_must_be_overridde]`) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
O-hermit
Operating System: Hermit
O-SGX
Target: SGX
O-solid
Operating System: SOLID
O-unix
Operating system: Unix-like
O-windows
Operating system: Windows
rollup
A PR which is a rollup
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.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc 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.
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:
IndexSlice
to be indexed by ranges. #136610 (AllowIndexSlice
to be indexed by ranges.)unbounded_shifts
#137393 (Stabilizeunbounded_shifts
)File::open_native
#137482 (Windows: use existing wrappers inFile::open_native
)str-to-string-128690.rs
CHECK{,-NOT}
s to make it less likely to incorrectly fail with symbol name mangling #137491 (Tightenstr-to-string-128690.rs``CHECK{,-NOT}
s to make it less likely to incorrectly fail with symbol name mangling)impl
blocks out ofrustc_middle/src/mir/syntax.rs
#137501 (Moveimpl
blocks out ofrustc_middle/src/mir/syntax.rs
)Failed merges:
#[rustc_intrinsic_must_be_overridde]
#137489 (remove#[rustc_intrinsic_must_be_overridde]
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup