Skip to content

update Miri #109241

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 37 commits into from
Mar 17, 2023
Merged

update Miri #109241

merged 37 commits into from
Mar 17, 2023

Conversation

saethlin
Copy link
Member

RalfJung and others added 30 commits February 26, 2023 19:13
a bit of FileDescriptor trait cleanup

- add default impl for `is_tty`
- `as_epoll_handle` was just dyn downcasting in disguise; this can be done more generally
Implement round_ties_even

For tests, I just copied over the standard library's tests for this feature. It looks like the library uses an approximate equality check for most/all float tests, and I've replaced that check with our float equality check pattern.
Add a section on using nextest

Inspired by this question: rust-lang/miri#2805
Co-authored-by: Ralf Jung <post@ralfj.de>
Install binaries to the miri toolchain's sysroot

The default install produces this behavior:
```
$ cargo +miri miri --version
miri 0.1.0 (0ba1f4a0 2023-03-05)
$ cargo +nightly miri --version
miri 0.1.0 (0ba1f4a0 2023-03-05)
```
Which is not good. We've effectively erased the toolchain selection, and users may reasonably conclude that their rustup install is broken.

After this change, we now get this:
```
$ cargo +miri miri --version
miri 0.1.0 (0ba1f4a0 2023-03-05)
$ cargo +nightly miri --version
miri 0.1.0 (f63ccaf 2023-03-06)
```

Thanks `@jyn514` who all but wrote this for me.
+ properties about the transitions
Vanille-N and others added 5 commits March 16, 2023 14:56
Tree borrows

This PR implements the experimental Tree Borrows (TB) rules for tracking reference aliasing, as an optional alternative to Stacked Borrows (SB).

SB and TB are mutually exclusive. Using `-Zmiri-tree-borrows` replaces every invocation of SB with the equivalent TB procedure.

A detailed explanation of the TB rules is currently under review, you can find the latest version [here [work in progress]](https://github.com/Vanille-N/tree-borrows/blob/master/model/treebor.pdf).

This PR does NOT yet include
- enough `fail` tests for TB (although TB is less reliant than SB on `fail` tests to check that the implementation matches the design due to `pass` tests being more strict)
- good diagnostics for TB violations
rustup

Doing a sync just before I do a rustc-push
@saethlin saethlin marked this pull request as ready for review March 16, 2023 23:49
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 16, 2023

The Miri subtree was changed

cc @rust-lang/miri

@oli-obk
Copy link
Contributor

oli-obk commented Mar 17, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 17, 2023

📌 Commit 3831a25 has been approved by oli-obk

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 Mar 17, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Mar 17, 2023

@bors p=1

@bors
Copy link
Collaborator

bors commented Mar 17, 2023

⌛ Testing commit 3831a25 with merge 2ebb675974dc3ae763e7c4d7e338d711995e577a...

@bors
Copy link
Collaborator

bors commented Mar 17, 2023

💔 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 Mar 17, 2023
@oli-obk
Copy link
Contributor

oli-obk commented Mar 17, 2023

@bors retry apple builder rustc exited with signal: 11 (SIGSEGV)

@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 Mar 17, 2023
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] libc test:false 1.139
[RUSTC-TIMING] unwind test:false 0.190
[RUSTC-TIMING] adler test:false 0.257
[RUSTC-TIMING] compiler_builtins test:false 2.717
rustc exited with signal: 11 (SIGSEGV)

Caused by:
Caused by:
  process didn't exit successfully: `/Users/runner/work/rust/rust/build/bootstrap/debug/rustc --crate-name compiler_builtins /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.87/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=10000 -C debuginfo=0 --cfg 'feature="c"' --cfg 'feature="cc"' --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -Zunstable-options --check-cfg 'names()' --check-cfg 'values()' -C metadata=976dad7a664053f2 -C extra-filename=-976dad7a664053f2 --out-dir /Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -L dependency=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps -L dependency=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage0-std/release/deps --extern core=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/librustc_std_workspace_core-1dac7c294ec458d1.rmeta --cap-lints allow --cfg=bootstrap -Csymbol-mangling-version=legacy -Zunstable-options -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(stdarch_intel_sde)' '--check-cfg=values(no_fp_fmt_parse)' '--check-cfg=values(no_global_oom_handling)' '--check-cfg=values(no_rc)' '--check-cfg=values(no_sync)' '--check-cfg=values(freebsd12)' '--check-cfg=values(backtrace_in_libstd)' '--check-cfg=values(target_env,"libnx")' '--check-cfg=values(target_arch,"asmjs","spirv","nvptx","xtensa")' -Zmacro-backtrace -Zosx-rpath-install-name '-Clink-args=-Wl,-rpath,@loader_path/../lib' -Csplit-debuginfo=unpacked -Cprefer-dynamic '-Zcrate-attr=doc(html_root_url="https://doc.rust-lang.org/nightly/")' -Z binary-dep-depinfo -L native=/Users/runner/work/rust/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/build/compiler_builtins-f8a54003d0d1caeb/out -l static=compiler-rt --cfg 'feature="unstable"' --cfg 'feature="mem-unaligned"' --cfg '__absvdi2="optimized-c"' --cfg '__absvsi2="optimized-c"' --cfg '__absvti2="optimized-c"' --cfg '__addvdi3="optimized-c"' --cfg '__addvsi3="optimized-c"' --cfg '__addvti3="optimized-c"' --cfg '__clzdi2="optimized-c"' --cfg '__clzsi2="optimized-c"' --cfg '__clzti2="optimized-c"' --cfg '__cmpdi2="optimized-c"' --cfg '__cmpti2="optimized-c"' --cfg '__ctzdi2="optimized-c"' --cfg '__ctzsi2="optimized-c"' --cfg '__ctzti2="optimized-c"' --cfg '__divdc3="optimized-c"' --cfg '__divsc3="optimized-c"' --cfg '__divxc3="optimized-c"' --cfg '__extendhfsf2="optimized-c"' --cfg '__ffsti2="optimized-c"' --cfg '__floatdixf="optimized-c"' --cfg '__floatundixf="optimized-c"' --cfg '__int_util="optimized-c"' --cfg '__muldc3="optimized-c"' --cfg '__mulsc3="optimized-c"' --cfg '__mulvdi3="optimized-c"' --cfg '__mulvsi3="optimized-c"' --cfg '__mulvti3="optimized-c"' --cfg '__mulxc3="optimized-c"' --cfg '__negdf2="optimized-c"' --cfg '__negdi2="optimized-c"' --cfg '__negsf2="optimized-c"' --cfg '__negti2="optimized-c"' --cfg '__negvdi2="optimized-c"' --cfg '__negvsi2="optimized-c"' --cfg '__negvti2="optimized-c"' --cfg '__paritydi2="optimized-c"' --cfg '__paritysi2="optimized-c"' --cfg '__parityti2="optimized-c"' --cfg '__popcountdi2="optimized-c"' --cfg '__popcountsi2="optimized-c"' --cfg '__popcountti2="optimized-c"' --cfg '__powixf2="optimized-c"' --cfg '__subvdi3="optimized-c"' --cfg '__subvsi3="optimized-c"' --cfg '__subvti3="optimized-c"' --cfg '__truncdfhf2="optimized-c"' --cfg '__truncsfhf2="optimized-c"' --cfg '__ucmpdi2="optimized-c"' --cfg '__ucmpti2="optimized-c"' --cfg 'atomic_flag_clear="optimized-c"' --cfg 'atomic_flag_clear_explicit="optimized-c"' --cfg 'atomic_flag_test_and_set="optimized-c"' --cfg 'atomic_flag_test_and_set_explicit="optimized-c"' --cfg 'atomic_signal_fence="optimized-c"' --cfg 'atomic_thread_fence="optimized-c"'` (exit status: 254)
[RUSTC-TIMING] memchr test:false 1.973
[RUSTC-TIMING] rustc_demangle test:false 2.148
[RUSTC-TIMING] alloc test:false 4.464
[RUSTC-TIMING] core test:false 30.826

@bors
Copy link
Collaborator

bors commented Mar 17, 2023

⌛ Testing commit 3831a25 with merge c50c62d...

@bors
Copy link
Collaborator

bors commented Mar 17, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing c50c62d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 17, 2023
@bors bors merged commit c50c62d into rust-lang:master Mar 17, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 17, 2023
@saethlin saethlin deleted the miri branch March 17, 2023 14:58
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c50c62d): 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

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

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)
3.7% [3.7%, 3.7%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [-0.5%, 3.7%] 2

# 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.

8 participants