on an error, always print the unnormalized stderr
Currently we skip this if a stderr diff was printed, but the stderr diff is normalized, so e.g. one cannot learn line numbers from it.
Is there a way to get the diff to only print the parts the differ, like a usual `diff -u`? Currently it always seems to print the full output, so with a long stderr we now get doubly long test results even if the diff is actually rather small.
Fix bugs where unique_range became invalid
And also expand the cache integrity checks to cover this case.
I'm going to run this over all the ICEs I've gotten out of Miri recently, could be a bit.
Fixes https://github.com/rust-lang/miri/issues/2389
And also expand the cache integrity checks to cover this case, and
generally assert a lot more about the unique_range, then tighten up
sloppy implementation scenarios that this uncovered.
fix some debugging papercuts
- detect when Miri got locally installed and is being run with the wrong toolchain
- when an ICE occurs, print a backtrace of where the interpreter was at the time
cargo-miri: write the Xargo project files atomically
`@matthiaskrgr` this should fix https://github.com/rust-lang/miri/issues/2340. Any chance you could test this before we land it?
add support for new RMW orders
Implements support for https://github.com/rust-lang/rust/pull/98383.
Also restructure intrinsic shims a bit so we have atomic and SIMD intrinsics in their own file, and refactor atomic intrinsic name parsing.
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.
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.
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. :)