Add statx shim for linux target
This is an attempt to fix: https://github.com/rust-lang/miri/issues/999 (for linux only)
Currently there is one problem that I haven't been able to solve. `std::fs::metadata` fails because the creation time is not available even though it is provided in the shim code.
In order to inform the caller that the field was provided, the `stx_flag` field must have the bits of `STATX_BTIME` set (which they are). The creation time is in the `stx_btime` field of the `statx` struct (see [1]). The relevant code in `libstd` is here (probably?): https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/fs.rs#L322
Another important point is that we are just providing the fields that are available in "all" platforms (this is, without using any platform specific traits or so). This can be improved later.
References:
[1] Man page: http://man7.org/linux/man-pages/man2/statx.2.html
[2] libc `statx` struct: https://docs.rs/libc/0.2.63/libc/struct.statx.html
Edit: The problem is that my filesystem is not providing it and I thought all filesystems could provide it. I changed the code so it only provides those dates if they are available. now we are ready to go.
r? @RalfJung @oli-obk
Add a scheme to find the place where an id was destroyed
cc https://github.com/rust-lang/miri/issues/974
I'm not too happy with it, but since stacked borrows don't have access to the current call stack, I can't just report a warning as per https://github.com/rust-lang/miri/issues/797
We could add some global mutex that we can throw strings at and `step` will clear out that mutex and report warnings before moving the `statement_id` or the `block_id`, not sure how well that would work. For now I think this is sufficient
Updated CI config to reflect deprecation of rustup uninstall
In the same spirit as #1110😄
This PR from the rustup repository brought me here: https://github.com/rust-lang/rustup/issues/2148
TL;DR With rustup 1.21.0 `rustup install` and `rustup uninstall` are being deprecated in favor of `rustup toolchain install` and `rustup toolchain uninstall`. There's plenty of code/documentation out there that needs to be updated to reflect this.
Thought It would be cool to help, however small the change may be. :)
Keep up the great work!
Updated README to reflect deprecation of rustup install
This PR from the rustup repository brought me here: https://github.com/rust-lang/rustup/issues/2148
TL;DR With rustup 1.21.0 `rustup install` and `rustup uninstall` are being deprecated in favor of `rustup toolchain install` and `rustup toolchain uninstall`. There's plenty of code/documentation out there that needs to be updated to reflect this.
Thought It would be cool to help, however small the change may be. :)
Keep up the great work!
better way to ignore tests in Miri
This is better because it avoids warnings due to unused imports (the ignored tests still get compiled, just not executed).