Commit Graph

6985 Commits

Author SHA1 Message Date
Ralf Jung
6ab64620a6 refactor atomic intrinsic handling to actually parse the intrinsic name 2022-07-18 08:55:50 -04:00
Ralf Jung
ad3010c449 make atomic intrinsic impl details private 2022-07-18 08:22:27 -04:00
Ralf Jung
c850ffe01a add support for new RMW orders 2022-07-18 08:20:06 -04:00
Ralf Jung
1174cda4f1 remove ret param from foreign_item hierarchy 2022-07-18 08:05:46 -04:00
Ralf Jung
53ead1b8c9 move simd intrinsics to their own file 2022-07-18 08:03:58 -04:00
Ralf Jung
52a6ac96b0 move atomic intrinsics to their own file 2022-07-18 07:55:11 -04:00
bors
5a4d71faad Auto merge of #2379 - RalfJung:ui-test-target-filter, r=oli-obk
ui_test: more robust syntax for target filtering

Implicit fallbacks are always fragile and prone to typos, so let's be explicit.
2022-07-18 07:26:49 +00:00
bors
0a0a15af5a Auto merge of #2380 - RalfJung:isatty, r=RalfJung
isatty tweaks

`@saethlin` I realized we need to gate this behind the isolation flag, sorry. :/  The point of isolated mode is that it is 100% deterministic, so we cannot call host functions that might give different answers on different runs.
2022-07-18 02:32:04 +00:00
Ralf Jung
e30dd07139 libc test: also call isatty on an actual file 2022-07-17 22:31:38 -04:00
Ralf Jung
090f289214 make an expect into proper error reporting 2022-07-17 21:57:56 -04:00
Ralf Jung
1c85975768 ui_test: more robust syntax for target filtering 2022-07-17 21:54:10 -04:00
Ralf Jung
896f558f2b with isolation we want to be fully deterministic 2022-07-17 21:50:10 -04:00
bors
8ec3425a8a Auto merge of #2349 - saethlin:isatty, r=RalfJung
Improve isatty support

Per https://github.com/rust-lang/miri/issues/2292#issuecomment-1171858283, this is an attempt at

> do something more clever with Miri's `isatty` shim

Since Unix -> Unix is very simple, I'm starting with a patch that just does that. Happy to augment/rewrite this based on feedback.

The linked file in libtest specifically only supports stdout. If we're doing this to support terminal applications, I think it would be strange to support one but not all 3 of the standard streams.

The `atty` crate contains a bunch of extra logic that libtest does not contain, in order to support MSYS terminals: db8d55f88e so I think if we're going to do Windows support, we should probably access all that logic somehow. I think it's pretty clear that the implementation is not going to change, so I think if we want to, pasting the contents of the `atty` crate into Miri is on the table, instead of taking a dependency.
2022-07-18 01:37:38 +00:00
Ben Kimock
eefdeacdb1 Test that isatty doesn't crash 2022-07-17 21:13:59 -04:00
Ben Kimock
2f84cb34c1 Pass through isatty if the host is also unix 2022-07-17 16:53:14 -04:00
bors
36a7a654b0 Auto merge of #2378 - RalfJung:sb, r=RalfJung
use PlaceTy visitor and dedup sime retagging code

I benchmarked this and as far as I can see the difference to the old code is totally within noise. And this makes the code a lot simpler and removes duplication so yay. :)
2022-07-17 14:40:37 +00:00
Ralf Jung
39866f817a remove a fastpath that does not seem to actually help 2022-07-17 10:35:19 -04:00
Ralf Jung
68510600a3 use PlaceTy visitor 2022-07-17 10:19:29 -04:00
bors
416cddb251 Auto merge of #2376 - RalfJung:rustup, r=RalfJung
rustup
2022-07-17 12:19:31 +00:00
Ralf Jung
e8ab64e424 make unused flags work like they used to 2022-07-17 08:18:55 -04:00
bors
006bb3cd26 Auto merge of #2377 - rust-lang:only-on-host, r=oli-obk
Add test flag for running a test only on the host
2022-07-17 11:00:55 +00:00
Oli Scherer
8527bfc63b clippy 2022-07-17 08:07:26 +00:00
Oli Scherer
444841bba9 Add test flag for running a test only on the host 2022-07-17 07:56:57 +00:00
Oli Scherer
43100f5f4b Remove --offline from ./miri install as otherwise we can't add more dependencies to miri as CI will fail.
if you want this locally, pass it to your invocation.
2022-07-17 07:46:02 +00:00
Ralf Jung
9782b7b039 rustup 2022-07-16 23:40:36 -04:00
bors
86911fd8f6 Auto merge of #2368 - RalfJung:debug, r=oli-obk
Make "./miri {build,run,test}" use debug assertions but "./miri install" not

This makes `./miri run`/`./miri test` use the full set of debug assertions (including the rather expensive ones that check consistency of the Stacked Borrows cache), but `./miri install` installs a Miri *without* those debug assertions.

That's the same behavior as cargo, and helps catch Miri bugs with the test suite while making installed Miri usable for larger runs.
2022-07-15 15:54:47 +00:00
bors
7b79801d23 Auto merge of #2375 - RalfJung:rustup, r=RalfJung
Rustup
2022-07-15 13:39:11 +00:00
Ralf Jung
98c401977b rustup 2022-07-15 08:09:43 -04:00
Ralf Jung
8c13a9ccd3 clarify how to run the manually installed Miri 2022-07-15 08:02:13 -04:00
Ralf Jung
d6cbe5d014 ensure that RangeMap panics on OOB 2022-07-14 15:09:20 -04:00
Ralf Jung
421f92bee6 make some debug assertions in RangeObjectMap be full assertions 2022-07-14 13:23:35 -04:00
Ralf Jung
fa7811bbe1 use the cargo default for debug/release builds 2022-07-14 13:19:44 -04:00
Ralf Jung
5d5999ab13 make cache consistency checks into regular debug assertions 2022-07-14 13:00:35 -04:00
Ralf Jung
efc76af134 don't forcefully enable debug assertions, but make -debug mode usable
still set those flags on CI though, we want to catch overflow there
2022-07-14 13:00:35 -04:00
bors
3b1eeabc49 Auto merge of #2372 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/99224
2022-07-14 13:55:40 +00:00
Ralf Jung
eaa7f10cb1 rustup 2022-07-14 09:54:20 -04:00
bors
e0672589d3 Auto merge of #2370 - RalfJung:weak-mem-test, r=RalfJung
add another weak mem consistency test

`@cbeuw` your code seems to do this correctly? :D
2022-07-14 12:23:47 +00:00
Ralf Jung
b8a0c49e51 test that we can see this weak behavior 2022-07-14 08:23:31 -04:00
Ralf Jung
07c3e42bd7 replace a macro by a function 2022-07-14 08:17:18 -04:00
Ralf Jung
820f322b86 add work-around for #2164 2022-07-14 08:07:59 -04:00
bors
6f6e01ef3b Auto merge of #2371 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/99224
2022-07-14 11:59:46 +00:00
Ralf Jung
11f2b83464 fix a missing thread join 2022-07-14 07:59:22 -04:00
Ralf Jung
bd69a92b4b rustup 2022-07-13 22:35:45 -04:00
Ralf Jung
a272ca2cf7 add another weak mem consistency test 2022-07-13 21:50:19 -04:00
bors
af2c50fb89 Auto merge of #2328 - RalfJung:perf, r=RalfJung
move checking ptr tracking on item pop into cold helper function

Before:
```
Benchmark 1: cargo miri run --manifest-path bench-cargo-miri/serde1/Cargo.toml
  Time (mean ± σ):      6.729 s ±  0.050 s    [User: 6.608 s, System: 0.124 s]
  Range (min … max):    6.665 s …  6.799 s    5 runs

Benchmark 2: cargo miri run --manifest-path bench-cargo-miri/unicode/Cargo.toml
  Time (mean ± σ):     20.923 s ±  0.271 s    [User: 20.386 s, System: 0.537 s]
  Range (min … max):   20.580 s … 21.165 s    5 runs
```
After:
```
Benchmark 1: cargo miri run --manifest-path bench-cargo-miri/serde1/Cargo.toml
  Time (mean ± σ):      6.562 s ±  0.023 s    [User: 6.430 s, System: 0.135 s]
  Range (min … max):    6.544 s …  6.594 s    5 runs

Benchmark 2: cargo miri run --manifest-path bench-cargo-miri/unicode/Cargo.toml
  Time (mean ± σ):     20.375 s ±  0.228 s    [User: 19.964 s, System: 0.413 s]
  Range (min … max):   20.201 s … 20.736 s    5 runs
```
Nothing major, but we'll take it I guess. 🤷

Fixes https://github.com/rust-lang/miri/issues/2132
2022-07-14 00:34:00 +00:00
bors
e16705de25 Auto merge of #2369 - RalfJung:reborrow, r=RalfJung
reborrow error: clarify that we are reborrowing *from* that tag

`@saethlin` I found the current message not entirely clear, so what do you think about this?
2022-07-14 00:04:40 +00:00
Ralf Jung
cc42cb1b21 reborrow error: clarify that we are reborrowing *from* that tag 2022-07-13 19:40:53 -04:00
Ralf Jung
83b9172774 move stacked_borrows.rs together with the other files of its module 2022-07-13 19:37:41 -04:00
bors
8884ea48af Auto merge of #2367 - RalfJung:ui-test-regex, r=RalfJung
use ui_test regex capabilities

We can have more precise patterns now, so use them for some of the tests where that makes sense. :)
2022-07-13 23:00:23 +00:00
Ralf Jung
757e88c901 use ui_test regex capabilities 2022-07-13 18:59:33 -04:00