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

Miri subtree update #129410

Merged
merged 13 commits into from
Aug 22, 2024
Merged

Miri subtree update #129410

merged 13 commits into from
Aug 22, 2024

Conversation

RalfJung
Copy link
Member

r? @ghost

The Miri Cronjob Bot and others added 13 commits August 20, 2024 05:00
needs a libc version bump
readdir_r shim: assume FreeBSD v12+

Blocked on rust-lang/libc#3723 being released and propagating to std.
It'd be useful to be able to verify code implementing SHA256 using SIMD
since such code is a bit more complicated and at some points requires
use of pointers. Until now `miri` didn't support x86 SHA256 intrinsics.
This commit implements them.
Implement SHA256 SIMD intrinsics on x86

Disclaimer: this is my first contribution to `miri`'s code. It's quite possible I'm missing something. This code works but may not be the cleanest/best possible.

It'd be useful to be able to verify code implementing SHA256 using SIMD since such code is a bit more complicated and at some points requires use of pointers. Until now `miri` didn't support x86 SHA256 intrinsics. This commit implements them.
borrow tracking: add a test for zero-sized protectors
epoll test: avoid some subtly dangling pointers

Turns out `let data = MaybeUninit::<u64>::uninit().as_ptr();` is a dangling pointer, the memory gets freed at the end of that line. For these cases we don't care as we don't actually access the pointer, but let's not do such subtle things.
…r=RalfJung

Make Tree Borrows Provenance GC no longer produce stack overflows

Most functions operating on Tree Borrows' trees are carefully written to not cause stack overflows due to too much recursion. The one exception is [`Tree::keep_only_needed`](https://github.com/rust-lang/miri/blob/94f5588fafcc7d59fce60ca8f7af0208e6f618d4/src/borrow_tracker/tree_borrows/tree.rs#L724), which just uses regular recursion.
This function is part of the provenance GC, so it is called regularly for every allocation in the program.

Tests show that this is a problem in practice. For example, the test `fill::horizontal_line` in crate `tiny-skia` (version 0.11.4) is such a test.

This PR changes this, this test no now longer crashes. Instead, it succeeds (after a _long_ time).
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 22, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 22, 2024

The Miri subtree was changed

cc @rust-lang/miri

@RalfJung
Copy link
Member Author

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Aug 22, 2024

📌 Commit 8b10bda has been approved by RalfJung

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 Aug 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 22, 2024
@bors
Copy link
Contributor

bors commented Aug 22, 2024

⌛ Testing commit 8b10bda with merge b50c8fe...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] miri test:false 4.527
error: failed to remove file `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-tools\x86_64-pc-windows-msvc\release\miri.exe`

Caused by:
  Access is denied. (os error 5)
Command has failed. Rerun with -v to see more details.
  local time: Thu, Aug 22, 2024  3:51:03 PM
  network time: Thu, 22 Aug 2024 15:51:03 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Contributor

bors commented Aug 22, 2024

💔 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 Aug 22, 2024
@ChrisDenton
Copy link
Member

ChrisDenton commented Aug 22, 2024

@bors retry spurious x86_64-msvc-ext again (#127883)

@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 Aug 22, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 22, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#126985 (Implement `-Z embed-source` (DWARFv5 source code embedding extension))
 - rust-lang#128935 (More work on `zstd` compression)
 - rust-lang#129263 (Add a missing compatibility note in the 1.80.0 release notes)
 - rust-lang#129386 (Use a LocalDefId in ResolvedArg.)
 - rust-lang#129408 (Fix handling of macro arguments within the `dropping_copy_types` lint)
 - rust-lang#129410 (Miri subtree update)
 - rust-lang#129416 (library: Move unstable API of new_uninit to new features)

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

bors commented Aug 22, 2024

⌛ Testing commit 8b10bda with merge eff0948...

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 22, 2024
@bors
Copy link
Contributor

bors commented Aug 22, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing eff0948 to master...

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

Finished benchmarking commit (eff0948): 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 2.2%, secondary -2.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)
2.2% [1.5%, 2.9%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) 2.2% [1.5%, 2.9%] 3

Cycles

Results (secondary -8.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)
-8.3% [-8.3%, -8.3%] 1
All ❌✅ (primary) - - 0

Binary size

Results (secondary 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)
- - 0
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Bootstrap: 749.145s -> 750.6s (0.19%)
Artifact size: 338.93 MiB -> 338.94 MiB (0.00%)

@RalfJung RalfJung deleted the miri-sync branch August 24, 2024 12:26
@jieyouxu jieyouxu added the CI-spurious-fail-msvc CI spurious failure: target env msvc label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-spurious-fail-msvc CI spurious failure: target env msvc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants