Commit Graph

5587 Commits

Author SHA1 Message Date
Smitty 5aecd2811e One character aliases for cargo-miri run/test
The main `cargo` command supports `cargo r` as an alias for
`cargo run`, and `cargo t` as an alias for `cargo test`. This adds
support to them in cargo-miri for consistency.
2021-09-11 12:00:59 -04:00
bors 0359331869 Auto merge of #1888 - hyd-dev:rustup, r=RalfJung
`rustc_mir` -> `rustc_const_eval`

This should fix the "[can't find crate for `rustc_mir`](https://github.com/rust-lang/rust/issues/88768)" build failure.
2021-09-09 18:38:56 +00:00
hyd-dev 9c62b6454e rustc_mir -> rustc_const_eval 2021-09-09 17:36:39 +08:00
bors 1cc822e6af Auto merge of #1884 - DrMeepster:start, r=RalfJung
add support for `#[start]`

This PR adds support for the `#[start]` attribute and fixes #1825.

It also renames `eval_main` to `eval_entry` to reflect that it can evaluate any entry function.
2021-09-08 19:43:41 +00:00
bors b97c34020e Auto merge of #1886 - camelid:stage2, r=RalfJung
Stage 2 seems to be required after all

Reverts most of bb59980b2d.

See the discussion starting at https://github.com/rust-lang/miri/issues/1340#issuecomment-913043714 for more.
2021-09-06 16:22:46 +00:00
bors 7a2f1cadcd Auto merge of #1887 - hyd-dev:rustup, r=RalfJung
`rustc_target::abi::LayoutOf` -> `rustc_middle::ty::layout::LayoutOf`

This should  <!---->fix<!----> rust-lang/rust#88671.
2021-09-06 16:06:33 +00:00
hyd-dev 3fedc7b249 rustc_target::abi::LayoutOf -> rustc_middle::ty::layout::LayoutOf 2021-09-06 23:05:48 +08:00
Noah Lev 78c031204d Stage 2 seems to be required after all
Reverts most of bb59980b2d.
2021-09-05 10:21:16 -07:00
DrMeepster 1ec28f78f3 remove commented out code 2021-09-02 15:45:52 -07:00
DrMeepster 84b058ac47 add support for #[start] 2021-09-02 15:41:10 -07:00
bors 4f1fca7512 Auto merge of #1883 - smoelius:master, r=RalfJung
Update compiletest_rs dependency

Hello. I am trying to [update some Clippy dependencies](https://github.com/rust-lang/rust/pull/88517) in the rust repo. To help keep the overall number of dependencies down, I was asked to submit a PR here to update `compiletest_rs` to from `0.6.0` to  `0.7.0`. I ran CI on my fork and the update didn't seem to cause any problems.
2021-09-01 18:13:26 +00:00
Samuel E. Moelius III 8d797fb154 Update compiletest_rs dependency 2021-09-01 08:53:51 -04:00
bors 9fc61cf486 Auto merge of #1879 - oli-obk:gitpod, r=RalfJung
Try out gitpod

At https://gitpod.io/#https://github.com/rust-lang/miri one can edit miri in the browser and run it and everything.

I'm experimenting with this here as a low-impact version of trying it out on the whole rustc repo. This .gitpod file should cause the user to land in a shell that can run ./miri test immediately without any additional prep
2021-08-30 15:33:59 +00:00
bors 09cadcbb62 Auto merge of #1882 - RalfJung:rustup, r=RalfJung
rustup
2021-08-30 14:37:11 +00:00
Ralf Jung 35b64447f3 rustup 2021-08-30 10:35:34 -04:00
bors d4a76a9ef1 Auto merge of #1880 - hyd-dev:rustup, r=oli-obk
Move `#[allow(unreachable_code)]` in `tests/run-pass/generator.rs`

The warning now appears on `yield 2;` instead of `drop(x)`: https://github.com/rust-lang/miri/runs/3429959882?check_suite_focus=true#step:8:265

`yield 2;` seems indeed unreachable so I adjusted the `#[allow]`.
2021-08-26 08:32:20 +00:00
hyd-dev 7301fe118a Move #[allow(unreachable_code)] in tests/run-pass/generator.rs 2021-08-26 16:16:43 +08:00
Oli Scherer 450e110b50 Try out gitpod 2021-08-24 15:03:36 +00:00
bors 08ca5606ab Auto merge of #1877 - hyd-dev:rustup, r=RalfJung
Add `#[allow(unreachable_code)]` to `drop(x)` in `tests/run-pass/generator.rs`

The test [starts to trigger this warning](https://github.com/rust-lang/miri/runs/3408355084?check_suite_focus=true#step:8:264) (I guess it's caused by rust-lang/rust#85556). The warning seems correct, but the unreachable code in that test also seems reasonable.
2021-08-24 12:39:59 +00:00
hyd-dev 33a67c6b33 Add #[allow(unreachable_code)] to drop(x) in tests/run-pass/generator.rs 2021-08-24 18:50:41 +08:00
bors 94ae910131 Auto merge of #1875 - niluxv:volatile_set_memory_intrinsic, r=RalfJung
Add support for the `volatile_set_memory` intrinsic

Add support for the unstable `volatile_set_memory` intrinsic

(Runtime behaviour and soundness requirements for `volatile_set_memory` are identical to those of `write_bytes`, so supporting this intrinsic is trivial.)
2021-08-23 10:55:48 +00:00
niluxv 083e5e604c Add test for volatile_set_memory 2021-08-23 12:42:13 +02:00
bors 7ec2bee723 Auto merge of #1874 - steffahn:a_an, r=RalfJung
Fix typos “a”→“an”

See rust-lang/rust#88230
2021-08-22 16:31:12 +00:00
Frank Steffahn c79f6dd5a0 Fix a typo “an”→“a” 2021-08-22 18:07:01 +02:00
niluxv 32c2df87be Add support for the volatile_set_memory intrinsic
Runtime behaviour and soundness requirements are identical to `write_bytes`.
2021-08-22 17:48:31 +02:00
Frank Steffahn a0d4372ff9 Fix typos “a”→“an” 2021-08-22 16:42:23 +02:00
bors 19691b2de8 Auto merge of #1872 - RalfJung:rustup, r=RalfJung
rustup
2021-08-16 15:35:14 +00:00
Ralf Jung 2c14bab76f llvm_asm → asm 2021-08-16 17:34:48 +02:00
Ralf Jung 9a6a5119fc rustup 2021-08-16 17:09:21 +02:00
bors e8ac524a30 Auto merge of #1871 - hyd-dev:no-mangle-method, r=RalfJung
Update tests for `#[no_mangle]` on associated functions

https://github.com/rust-lang/rust/pull/86492 has landed:
- The code in https://github.com/rust-lang/miri/issues/1837 starts to work (even without `AssocFn::foo();` at line 12) in Miri.
- `pub` is not necessary for `#[no_mangle]` associated functions in `test-cargo-miri/exported-symbol-dep/src/lib.rs` anymore.

Closes https://github.com/rust-lang/miri/issues/1837.
2021-08-15 11:41:00 +00:00
hyd-dev 838ed1d754 Update tests for #[no_mangle] associated functions 2021-08-15 17:21:33 +08:00
bors 13fae3d074 Auto merge of #1870 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/88016
2021-08-14 12:49:46 +00:00
Ralf Jung 78b4c7bf79 rustup 2021-08-14 14:47:57 +02:00
bors 042cbf175b Auto merge of #1868 - hyd-dev:rustup, r=RalfJung
Fix tests for `C-unwind` ABI changes

cc https://github.com/rust-lang/rust/issues/87778
2021-08-07 13:16:22 +00:00
bors d3157def75 Auto merge of #1865 - rust-lang:test-cargo-miri, r=RalfJung
improve test-cargo-miri output
2021-08-07 12:55:06 +00:00
hyd-dev af7eb369b1 Fix tests for C-unwind ABI changes 2021-08-07 15:57:54 +08:00
Ralf Jung d12d4050ae improve test-cargo-miri output 2021-08-04 11:25:33 +02:00
bors 3ca53e0307 Auto merge of #1864 - hyd-dev:rustup, r=RalfJung
Update cargo-miri test

The doctest output was [changed](https://github.com/rust-lang/miri/runs/3238758260?check_suite_focus=true#step:8:1263) (probably by https://github.com/rust-lang/cargo/pull/9730). Update `test-cargo-miri/test.default.stdout.ref` to match the new output.
2021-08-04 09:25:18 +00:00
hyd-dev dced6b8518 Update cargo-miri test 2021-08-04 16:46:11 +08:00
bors 99ec9c1707 Auto merge of #1854 - RalfJung:partial-ptr-overwrite, r=RalfJung
adjust for ERR_ON_PARTIAL_PTR_OVERWRITE

The Miri side of https://github.com/rust-lang/rust/pull/87248
2021-08-02 16:00:43 +00:00
Ralf Jung 3a922286e3 rustup 2021-08-02 17:59:48 +02:00
Ralf Jung 257e9cef66 docify some comments 2021-08-02 17:58:55 +02:00
Ralf Jung 5338a16018 adjust for ERR_ON_PARTIAL_PTR_OVERWRITE 2021-08-02 17:58:55 +02:00
bors 1f969da570 Auto merge of #1863 - hyd-dev:parallel-compiler, r=RalfJung
Use `Lrc` instead of `Rc` in `MiriCompilerCalls::config()`

The `used_crate_source` query defines its return type as [`Lrc<CrateSource>`](https://github.com/rust-lang/rust/blob/1195bea5a7b73e079fa14b37ac7e375fc77d368a/compiler/rustc_middle/src/query/mod.rs#L1418), which would be `Arc` when `parallel-compiler = true`.

I assume this fixes rust-lang/rust#87623. I didn't test that locally -- I'm not interested in `parallel-compiler = true` enough to be willing to recompile rustc with that configuration to test it, but I'm submitting this in case it might be useful for `parallel-compiler = true` users.
2021-07-30 14:38:10 +00:00
hyd-dev a789b49e4c Use Lrc instead of Rc in MiriCompilerCalls::config() 2021-07-30 21:28:34 +08:00
bors 453e3ef7da Auto merge of #1861 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/87518
2021-07-27 16:39:12 +00:00
Ralf Jung c76fa2138e rustup 2021-07-27 18:38:35 +02:00
bors 02f78b089c Auto merge of #1858 - RalfJung:thread-leaks, r=oli-obk
also ignore 'thread leaks' with -Zmiri-ignore-leaks

This is a step towards https://github.com/rust-lang/miri/issues/1371. The remaining hard part would be supporting checking for memory leaks when there are threads still running. For now we elegantly avoid this problem by using the same flag to control both of these checks. :)
2021-07-27 12:23:56 +00:00
Ralf Jung 78bcd12b17 make sure we only terminate main thread once TLS is initialized 2021-07-27 14:05:37 +02:00
Ralf Jung 66aa3d0247 make the loop infinite 2021-07-27 13:58:55 +02:00