Skip to content
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 5 pull requests #133950

Merged
merged 10 commits into from
Dec 6, 2024
Merged

Rollup of 5 pull requests #133950

merged 10 commits into from
Dec 6, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

azhogin and others added 10 commits December 2, 2024 01:14
Fix missing newlines that rustfmt removed.

fix trailing whitespace

Fix duplicate word.

Reformat panic reasons into a list

remove trailing whitespace 2 electric boogaloo

Change verbe tense.

Integrate suggestions
For the Rust ABI we don't have any ABI compat reasons to allow
PassMode::Direct for aggregates.
… r=workingjubilee

rust_for_linux: -Zreg-struct-return commandline flag for X86 (rust-lang#116973)

Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux.
This flag enables the same behavior as the `abi_return_struct_as_int` target spec key.

- Tracking issue: rust-lang#116973
…-ffi, r=RalfJung

Extend Miri to correctly pass mutable pointers through FFI

Based off of rust-lang#129684, this PR further extends Miri to execute native calls that make use of pointers to *mutable* memory.
We adapt Miri's bookkeeping of internal state upon any FFI call that gives external code permission to mutate memory.

Native code may now possibly write and therefore initialize and change the pointer provenance of bytes it has access to: Such memory is assumed to be *initialized* afterwards and bytes are given *arbitrary (wildcard) provenance*. This enables programs that correctly use mutating FFI calls to run Miri without errors, at the cost of possibly missing Undefined Behaviour caused by incorrect usage of mutating FFI.

> <details>
>
> <summary> Simple example </summary>
>
> ```rust
> extern "C" {
>   fn init_int(ptr: *mut i32);
> }
>
> fn main() {
>   let mut x = std::mem::MaybeUninit::<i32>::uninit();
>   let x = unsafe {
>     init_int(x.as_mut_ptr());
>     x.assume_init()
>   };
>
>   println!("C initialized my memory to: {x}");
> }
> ```
> ```c
> void init_int(int *ptr) {
>   *ptr = 42;
> }
> ```
> should now show `C initialized my memory to: 42`.
>
> </details>

r? ``@RalfJung``
…ondi,workingjubilee

Improve documentation for Vec::extend_from_within

This closes rust-lang#104762.

It rephrases some of the explanations, and greatly improves the clarity of the example.
Based on this PR and its discussions:
https://github.com/rust-lang/rust/pull/105030/files#r1059808792
…=ehuss

rustbook: update to use new mdbook-trpl package from The Book

Updates to the latest merge from `rust-lang/book` and simplifies the dependency chain there. There are now three preprocessors, but only one package, so everything is a lot nicer to deal with from the consuming POV (i.e. here).
…_checking, r=nnethercote

Only allow PassMode::Direct for aggregates on wasm when using the C ABI

For the Rust ABI we don't have any ABI compat reasons to allow PassMode::Direct for aggregates.
@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 6, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 6, 2024

📌 Commit 875df6c has been approved by matthiaskrgr

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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 6, 2024
@bors
Copy link
Contributor

bors commented Dec 6, 2024

⌛ Testing commit 875df6c with merge bc145ce...

@bors
Copy link
Contributor

bors commented Dec 6, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing bc145ce to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 6, 2024
@bors bors merged commit bc145ce into rust-lang:master Dec 6, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 6, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#130777 rust_for_linux: -Zreg-struct-return commandline flag for X8… d1c5e0cc5847159065e99204947d5cb926275fb9 (link)
#133211 Extend Miri to correctly pass mutable pointers through FFI e3b8092c0c33687b6dfc570d589fd80f743ac2d6 (link)
#133790 Improve documentation for Vec::extend_from_within 0506b75416208eb0e8cf5f0f60c8bb35fde0ab63 (link)
#133930 rustbook: update to use new mdbook-trpl package from The Bo… 9ec9f3158bb9d1bd1e635c99e810c9ad2bf865fb (link)
#133931 Only allow PassMode::Direct for aggregates on wasm when usi… 23860c61eef2d11e61cc80f2dacf5c33d8cb0559 (link)

previous master: acf48426b6

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bc145ce): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.5% [1.5%, 1.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.6% [-1.6%, -1.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-1.6%, 1.5%] 2

Cycles

Results (secondary -1.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 769.005s -> 769.713s (0.09%)
Artifact size: 330.87 MiB -> 330.91 MiB (0.01%)

@matthiaskrgr matthiaskrgr deleted the rollup-b7g5p73 branch January 25, 2025 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants