Skip to content

Miri subtree update #124193

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 56 commits into from
Apr 21, 2024
Merged

Miri subtree update #124193

merged 56 commits into from
Apr 21, 2024

Conversation

RalfJung
Copy link
Member

r? @ghost

The Miri Cronjob Bot and others added 30 commits April 16, 2024 05:15
threads: keep track of why we are blocked, and sanity-check that when waking up

Also remove support for condvars blocked on rwlocks, as that was no longer used.
no_std works on Windows now

Since we now properly support the magic linker section for TLS dtors, the no_std test works on Windows.
implement support for __rust_alloc_error_handler

Fixes rust-lang/miri#3439
directly call handle_alloc_error

Also test more codepaths. There's like 5 different things that can happen on allocation failure! Between `-Zoom`, `#[alloc_error_handler]`, and `set_alloc_error_hook`, we have 3 layers of behavior overrides. It's all a bit messy.

rust-lang#112331 seems intended to clean this up, but has not yet reached consensus.
add test for Drop terminator on non-drop type

Fixes rust-lang/miri#2737
move read_byte_slice to general helpers file, next to read_c_str
add test checking that we do run MIR validation

Fixes rust-lang/miri#2840
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Apr 20, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2024
Rollup of 11 pull requests

Successful merges:

 - rust-lang#123379 (Print note with closure signature on type mismatch)
 - rust-lang#123967 (static_mut_refs: use raw pointers to remove the remaining FIXME)
 - rust-lang#123976 (Use fake libc in core test)
 - rust-lang#123986 (lint-docs: Add redirects for renamed lints.)
 - rust-lang#124053 (coverage: Branch coverage tests for lazy boolean operators)
 - rust-lang#124071 (Add llvm-bitcode-linker to build manifest)
 - rust-lang#124103 (Improve std::fs::Metadata Debug representation)
 - rust-lang#124132 (llvm RustWrapper: explain OpBundlesIndirect argument type)
 - rust-lang#124191 (Give a name to each distinct manipulation of pretty-printer FixupContext)
 - rust-lang#124193 (Miri subtree update)
 - rust-lang#124196 (mir-opt tests: rename unit-test -> test-mir-pass)

r? `@ghost`
`@rustbot` modify labels: rollup
@jieyouxu
Copy link
Member

Failed in rollup #124204 (comment)

FAILED TEST: tests/panic\mir-validation.rs
command: "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1\\bin\\miri.exe" "--error-format=json" "--sysroot=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\miri-sysroot" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zmiri-provenance-gc=1" "-Zui-testing" "--target" "x86_64-pc-windows-msvc" "--extern" "getrandom_01=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libgetrandom-de8a1b4b21badd22.rlib" "--extern" "getrandom_01=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libgetrandom-de8a1b4b21badd22.rmeta" "--extern" "getrandom_02=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libgetrandom-e5f662dadaebb8db.rlib" "--extern" "getrandom_02=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libgetrandom-e5f662dadaebb8db.rmeta" "--extern" "libc=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\liblibc-3e0139bc6eeab6f9.rlib" "--extern" "libc=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\liblibc-3e0139bc6eeab6f9.rmeta" "--extern" "num_cpus=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libnum_cpus-127d4d81b9c33250.rlib" "--extern" "num_cpus=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libnum_cpus-127d4d81b9c33250.rmeta" "--extern" "rand=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\librand-01b5952caee7083c.rlib" "--extern" "rand=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\librand-01b5952caee7083c.rmeta" "--extern" "tempfile=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libtempfile-a86f06dcd7fa18db.rlib" "--extern" "tempfile=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libtempfile-a86f06dcd7fa18db.rmeta" "--extern" "page_size=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libpage_size-0ba767a1728111db.rlib" "--extern" "page_size=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libpage_size-0ba767a1728111db.rmeta" "--extern" "tokio=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libtokio-07db6c3a892515e9.rlib" "--extern" "tokio=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libtokio-07db6c3a892515e9.rmeta" "--extern" "windows_sys=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libwindows_sys-07455d154a735a27.rlib" "--extern" "windows_sys=C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps\\libwindows_sys-07455d154a735a27.rmeta" "-L" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\x86_64-pc-windows-msvc\\debug\\deps" "-L" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\miri\\debug\\deps" "--out-dir" "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage1-tools\\ui\\tests\\panic" "tests/panic\\mir-validation.rs" "--edition" "2021"
##[error]no message
##[error]no message
##[error]remove this line and possibly later ones by blessing the test
error: panic test got exit code: 0x80000003, but expected 101
error: actual output differed from expected
error: actual output differed from expected
Execute `./miri test --bless` to update `tests/panic\mir-validation.stderr` to the actual output
--- tests/panic\mir-validation.stderr
 thread 'rustc' panicked at compiler/rustc_const_eval/src/transform/validate.rs:LL:CC:
 thread 'rustc' panicked at compiler/rustc_const_eval/src/transform/validate.rs:LL:CC:
 broken MIR in Item(DefId) (after phase change to runtime-optimized) at bb0[1]:
 #0 [optimized_mir] optimizing MIR for `main`
 end of query stack
-
-
-Miri caused an ICE during evaluation. Here's the interpreter backtrace at the time of the panic:
-   |
-   |
-LL |     extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
-   |
-

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 20, 2024
@RalfJung
Copy link
Member Author

That's very strange... somehow catch_unwind does not seem to detect this ICE-induced unwinding, so our custom message is not printed -- but it works fine on Miri's own Windows CI.

@bjorn3 @nbdd0121 is there some reason that catch_unwind would not behave as expected on x86_64-pc-windows-msvc? Are we building the compiler without unwinding on some platforms, or something like that?

@RalfJung
Copy link
Member Author

@bors r+ rollup=iffy

@bors
Copy link
Collaborator

bors commented Apr 21, 2024

📌 Commit 0303d8e 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 21, 2024
@bors
Copy link
Collaborator

bors commented Apr 21, 2024

⌛ Testing commit 0303d8e with merge c46d5fb...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 21, 2024
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 21, 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 Apr 21, 2024
let's just disable it there, this code is not platform-dependent anyway
@RalfJung
Copy link
Member Author

Oh we're also getting the wrong exit code

panic test got exit code: 0x80000003, but expected 101

I have no idea what that means... I think I'll just disable the test on Windows.

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 21, 2024

📌 Commit ae37b6e 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 Apr 21, 2024
@bors
Copy link
Collaborator

bors commented Apr 21, 2024

⌛ Testing commit ae37b6e with merge fecb7b4...

@bors
Copy link
Collaborator

bors commented Apr 21, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 21, 2024
@bors bors merged commit fecb7b4 into rust-lang:master Apr 21, 2024
@rustbot rustbot added this to the 1.79.0 milestone Apr 21, 2024
@RalfJung RalfJung deleted the miri branch April 21, 2024 13:05
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fecb7b4): comparison URL.

Overall result: ❌ regressions - 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.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 1

Max RSS (memory usage)

Results

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

Cycles

Results

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)
-4.1% [-6.1%, -2.6%] 4
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 671.949s -> 672.598s (0.10%)
Artifact size: 315.25 MiB -> 315.25 MiB (-0.00%)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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.

6 participants