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 4 pull requests #125294

Merged
merged 52 commits into from
May 19, 2024
Merged

Rollup of 4 pull requests #125294

merged 52 commits into from
May 19, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

bend-n and others added 30 commits May 11, 2024 17:13
Use non-null pointer for size 0 posix memalign

Fixes rust-lang#3576
Don't print unnecessary sysroot messages

Currently, when running `cargo miri setup`, we always print that a sysroot is being prepared, even if we just bail out of building after checking the hash. So that message is wrong; we didn't actually prepare a sysroot.

We also always print the preparing message for `cargo miri run`, even if no sysroot is prepared.

With this PR, `cargo miri run` prints no sysroot messages when an existing one is reused, and when a redundant `cargo miri setup` is requested, we print:
```
A sysroot for Miri is already available in `/home/ben/.cache/miri`.
```
fixing part of `miri test alloc/hashmap`.
intrinsics: just panic when they get used incorrectly

This is already what we do most of the time, so do it consistently.
Rustup, aligned heap-allocations on wasm

Pulls in rust-lang#125003 so allocation tests should now work on wasm.
attempt changing Bytes in MiriMachine to MiriAllocBytes

rename miri_alloc_bytes to alloc_bytes

generalize impl VisitProvenance for Allocation for any Bytes: AllocBytes

mend MiriAllocBytes -> Self::Bytes

fix Invariant documentation and bugs (drop), impl Clone

Update MiriAllocBytes description

Co-authored-by: Ralf Jung <[email protected]>

Rephrase MiriAllocBytes ptr invariant

Co-authored-by: Ralf Jung <[email protected]>

Update MiriAllocBytes ptr documentation

Co-authored-by: Ralf Jung <[email protected]>

fix safety comment in MiriAllocBytes::clone

fix safety comment in MiriAllocBytes::from_bytes

try implementing clone without unsafe

remove derive(PartialEq,Eq,Hash), fix fmt

move ptr.is_null() check inside only necessary branch

use std::ptr::without_provenance_mut, requiring feature(strict_provenance)

align.bytes_usize() instead of align.bytes().try_into().unwrap()

Update src/provenance_gc.rs

Co-authored-by: Ralf Jung <[email protected]>

fix clippy error on deref
Adjust Allocation Bytes used by Miri to custom MiriAllocBytes

Previously, the `MiriMachine` used `type Bytes = Box<[u8]>` for its allocations.
This PR swaps this out for a custom `MiriAllocBytes` type implemented in `alloc_bytes.rs`.
This is in anticipation of an extension to Miri's FFI, which will require its allocations to take care of alignment (the methods in `impl AllocBytes for Box<[u8]>` ignore this `_align: Align` argument).

Needs rust-lang#124492
Give `FileDescription::{read, write}` access to the `MiriInterpCx `

fixes rust-lang#3572
Ignore the Helix configuration directory

For us Helix users.
RalfJung and others added 8 commits May 19, 2024 19:31
- share implementation with miri_starting_unwind
- make test use a custom unwinding class
- extend comments
- use NeedsUnwind more consistently
Directly implement native exception raise methods in miri

This implements the `_Unwind_RaiseException` function used on pretty much every unix system for starting unwinding. This allows removing the miri special case from libpanic_unwind for unix.

Windows still needs `miri_start_unwind` as SEH unwinding isn't supported by miri. Unlike DWARF unwinding, SEH preserves all stack frames until right after the do_catch function has executed. Because of this panic_unwind stack allocates the exception object. Miri can't currently model unwinding without destroying stack frames and as such will report a use-after-free of the exception object.
…ompiler-errors

chore: Remove repeated words (extension of rust-lang#124924)

When I saw rust-lang#124924 I thought "Hey, I'm sure that there are far more than just two typos of this nature in the codebase". So here's some more typo-fixing.

Some found with regex, some found with a spellchecker. Every single one manually reviewed by me (along with hundreds of false negatives by the tools)
…ChrisDenton

Add example to IsTerminal::is_terminal
…aDotInTheVoid,Nilstrieb,BoxyUwU

make `Debug` impl for `Term` simpler

meow
@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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. rollup A PR which is a rollup labels May 19, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=4

@bors
Copy link
Contributor

bors commented May 19, 2024

📌 Commit 7a45322 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 May 19, 2024
@bors
Copy link
Contributor

bors commented May 19, 2024

⌛ Testing commit 7a45322 with merge d84b903...

@bors
Copy link
Contributor

bors commented May 19, 2024

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

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#124948 chore: Remove repeated words (extension of #124924) 39a643101d0172ade5596c52a8178b59595916d8 (link)
#124992 Add example to IsTerminal::is_terminal e7751ad1a9139de97596584f6271315ab9b02100 (link)
#125279 make Debug impl for Term simpler 9291c42d7eead3ef054f19e39dd56fd6988753de (link)
#125286 Miri subtree update 080e248569232f1d7ba5d168335bc419dbef6ed5 (link)

previous master: 1d1283ed09

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 (d84b903): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was 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)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 5.2%)

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)
5.2% [2.6%, 7.8%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 5.2% [2.6%, 7.8%] 2

Cycles

Results (secondary -6.3%)

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)
-6.3% [-6.3%, -6.3%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 668.514s -> 669.127s (0.09%)
Artifact size: 316.20 MiB -> 316.16 MiB (-0.01%)

bors added a commit to rust-lang-ci/rust that referenced this pull request May 30, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#124948 (chore: Remove repeated words (extension of rust-lang#124924))
 - rust-lang#124992 (Add example to IsTerminal::is_terminal)
 - rust-lang#125279 (make `Debug` impl for `Term` simpler)
 - rust-lang#125286 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr matthiaskrgr deleted the rollup-w42c829 branch September 1, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.