Commit Graph

5528 Commits

Author SHA1 Message Date
Ralf Jung
df9d481989 tell users how to disable the leak check 2021-07-25 14:21:06 +02:00
Ralf Jung
71efd950d1 also ignore 'thread leaks' with -Zmiri-ignore-leaks 2021-07-25 14:21:06 +02:00
bors
e2872a3f2a Auto merge of #1853 - RalfJung:negative-offsets, r=RalfJung
better errors for negative out-of-bounds offsets

This is the Miri side of https://github.com/rust-lang/rust/pull/87224
2021-07-20 11:39:12 +00:00
Ralf Jung
63286771d3 rustup 2021-07-20 13:38:52 +02:00
Ralf Jung
cf26458376 test for negative offsets 2021-07-20 13:30:49 +02:00
Ralf Jung
46ed39ec20 adjust for PointerOutOfBounds change 2021-07-20 13:30:49 +02:00
bors
37974e617e Auto merge of #1855 - RalfJung:rustup, r=RalfJung
rustup

This test was removed in rustc in https://github.com/rust-lang/rust/pull/87141.

We added it in https://github.com/rust-lang/miri/pull/1430, and possibly that "interesting case in unsizing" is not covered by tests now -- but I don't remember what that case is.^^ If/when `impl Trait` in bindings comes back, we should copy the new rustc tests to Miri as well.
2021-07-20 10:21:08 +00:00
Ralf Jung
6ce77164c1 rustup 2021-07-20 12:18:59 +02:00
bors
250eff85c8 Auto merge of #1851 - RalfJung:provenance-overhaul, r=RalfJung
adjust Miri to Pointer type overhaul

This is the Miri side of https://github.com/rust-lang/rust/pull/87123.

This was a lot more work than I expected... lucky enough it is also (hopefully) the last large-scale refactoring I will do.^^

Fixes https://github.com/rust-lang/miri/issues/224
2021-07-17 19:46:33 +00:00
Ralf Jung
0d65d500c6 rustup 2021-07-17 20:24:57 +02:00
Ralf Jung
bf8b2aa8dc add test for better ptr handling in enum niches 2021-07-17 13:59:58 +02:00
Ralf Jung
a1233a721d adjust Miri to Pointer type overhaul 2021-07-16 10:10:12 +02:00
bors
a4a9a36d20 Auto merge of #1850 - RalfJung:fmt, r=RalfJung
fmt: set force_multiline_blocks=true

This is an experiment, I am not yet sure if I like it... but it does prevent rustfmt from putting stuff after the `=>` in a `match` (unless the entire arm fits there), which IMO is a big plus. What do others think?
(I also tried setting `match_arm_blocks` back to its default of `true`, but that adds too many braces for my taste.)

Btw, `@calebcartwright` is the interaction of `match_arm_blocks = false` and `force_multiline_blocks = true` as can be seen here expected? I think I like it, but it it is not at all what I expected from the docs which describe `force_multiline_blocks = true` as "Force multiline closure and match arm bodies to be wrapped in a block" -- but here that is not the effect it has, there are no new blocks being added.
2021-07-12 16:26:02 +00:00
Ralf Jung
cffa1d325c fmt cargo-miri 2021-07-11 14:27:07 +02:00
Ralf Jung
0341b8ac84 fmt: set force_multiline_blocks=true 2021-07-11 14:18:44 +02:00
bors
b06130762e Auto merge of #1849 - Aaron1011:rustup-track-caller, r=RalfJung
Rustup for `#[track_caller]` trait object changes

Change test to assert that we get the correct location
even through a trait object call.
2021-07-10 17:15:31 +00:00
Aaron Hill
811423e761
Rustup for #[track_caller] trait object changes
Change test to assert that we get the correct location
even through a trait object call.
2021-07-10 11:51:00 -05:00
bors
3cf6550cc1 Auto merge of #1848 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/86923
2021-07-07 07:33:42 +00:00
Ralf Jung
833dff994f rustup 2021-07-07 09:33:01 +02:00
bors
4a30b68d45 Auto merge of #1846 - RalfJung:license, r=RalfJung
sync license files with rustc repo

`@Mark-Simulacrum` pointed out that our license files are slightly different from those in rustc. This syncs them.

The question is... is this a thing we can just do?^^
2021-07-06 11:58:42 +00:00
bors
74f81e952c Auto merge of #1847 - RalfJung:more-tags, r=RalfJung
also treat CallerLocation and Machine memory as properly tagged

Only heap allocations need an exception.
2021-07-06 08:14:03 +00:00
Ralf Jung
447f23c71b fmt 2021-07-06 10:13:30 +02:00
Ralf Jung
340267525c exported_symbols_cache: ensure we do not overwrite anything 2021-07-06 10:09:53 +02:00
Ralf Jung
9b57313a4d also treat CallerLocation and Machine memory as properly tagged 2021-07-06 10:07:48 +02:00
Ralf Jung
efd582c6d8 explicitly list memory kinds for stacked borrows 2021-07-06 10:04:16 +02:00
Ralf Jung
ca782dfc1c sync license files with rustc repo 2021-07-05 19:34:08 +02:00
bors
15e81a94b1 Auto merge of #1845 - Smittyvb:fix-after-mir-alloc-oom, r=RalfJung
Make work with latest rustc

Cc https://github.com/rust-lang/rust/issues/86863, which was caused by PR https://github.com/rust-lang/rust/pull/86255.
2021-07-04 20:35:34 +00:00
Smitty
d19376985d Make work after mir-alloc-oom 2021-07-04 09:59:55 -04:00
bors
6a18683d09 Auto merge of #1842 - hyd-dev:target-dir, r=RalfJung
Use `miri` inside the target directory used by rustc as Miri's target directory

Resolves #1311.

This PR makes Miri use `miri` inside the rustc target directory as its target directory, by letting `cargo-miri` get the rustc target directory by calling `cargo metadata`, append `miri` to it, and pass it with `--target-dir` to Cargo.

Getting the rustc target directory accurately requires calling `cargo metadata` as far as I know, because the `target-dir` can be set in config files in various places that are hard for `cargo-miri` to find.

I also considered https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#custom-named-profiles, but it looks like that requires adding `cargo-features = ["named-profiles"]` to **`Cargo.toml`**, which would be tricky for `cargo-miri`:
```
$ cargo +nightly-2021-06-23 test --config 'profile.miri.inherits="release"' --profile=miri -Z named-profiles -Z unstable-options
error: config profile `miri` is not valid (defined in `--config cli option`)

Caused by:
  feature `named-profiles` is required

  consider adding `cargo-features = ["named-profiles"]` to the manifest
```
2021-07-03 07:34:41 +00:00
bors
05fdec916a Auto merge of #1844 - hyd-dev:rustup, r=RalfJung
Update for `TyCtxt::crates()` change

cc rust-lang/rust#86792
2021-07-02 08:49:49 +00:00
hyd-dev
e3fca9b3f1
Import std::process::self 2021-07-02 16:39:43 +08:00
hyd-dev
c504e3dee0
Add a comment in .github/workflows/ci.yml 2021-07-02 16:39:43 +08:00
hyd-dev
76fe48543c
Update for TyCtxt::crates() change 2021-07-02 16:08:27 +08:00
bors
61605ebde2 Auto merge of #1843 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/86723
2021-06-29 18:48:08 +00:00
Ralf Jung
e33bf695db rustup 2021-06-29 20:47:28 +02:00
hyd-dev
08236912a7
Improve doc comment 2021-06-27 23:10:09 +08:00
hyd-dev
7d310aa836
Fix .expect() message 2021-06-27 23:08:38 +08:00
hyd-dev
e751eeb197
drop(cmd.arg(arg)) -> cmd.arg(arg); 2021-06-27 23:07:15 +08:00
hyd-dev
34217bdc8e
Use rustup-toolchain-install-master to install Cargo 2021-06-27 23:05:08 +08:00
hyd-dev
1692932966
Show error if --target-dir is provided more than once 2021-06-26 22:36:05 +08:00
hyd-dev
8f87903ec9
Fix typo 2021-06-26 22:22:40 +08:00
hyd-dev
2ced7ecb9f
ArgFlagValueWithOtherArgsIter -> ArgSplitFlagValue 2021-06-26 22:21:07 +08:00
hyd-dev
59408b68dd
Add some comments in test-cargo-miri/run-tests.py 2021-06-26 22:21:07 +08:00
hyd-dev
c3ad18256d
long closure -> function 2021-06-26 22:21:07 +08:00
hyd-dev
2d17b5a550
Use miri inside the target directory used by rustc as Miri's target directory 2021-06-25 01:09:10 +08:00
bors
4933e280b2 Auto merge of #1841 - RalfJung:debug, r=RalfJung
use exhaustive struct match for manual Debug impl
2021-06-20 17:47:42 +00:00
Ralf Jung
7b2d2cfa46 use exhaustive struct match for manual Debug impl 2021-06-20 19:33:05 +02:00
bors
23f05fc603 Auto merge of #1840 - hyd-dev:rustup, r=RalfJung
Update backtraces

(rust-lang/rust#86034 changed them.)

cc rust-lang/rust#86474
2021-06-20 09:54:48 +00:00
hyd-dev
2644647053
Update backtraces 2021-06-20 15:12:11 +08:00
bors
5b7f1f919b Auto merge of #1839 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/86409
2021-06-17 18:53:16 +00:00