-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Miri subtree update #127726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miri subtree update #127726
Conversation
Currently cargo-miri uses the first target specified in the command line. However, when multiple targets are specified in a `cargo build` invocation, cargo will build for all of them. Miri should match this behaviour to reduce surprises. Fixes: rust-lang#3460
This is an attempt to remove the magic from a lot of the numbers tested, which should make things easier when it is time to add `f16` and `f128`. A nice side effect is that these tests now cover all int <-> float conversions with the same amount of tests. Co-authored-by: Ralf Jung <[email protected]>
…alfJung Refactor float casting tests, add `f16` and `f128` This is an attempt to remove the magic from a lot of the numbers tested, which makes things easier when adding `f16` and `f128`. A nice side effect is that these tests now cover all int <-> float conversions with the same amount of tests.
Run tests for all specified targets Currently cargo-miri uses the first target specified in the command line. However, when multiple targets are specified in a `cargo build` invocation, cargo will build for all of them. Miri should match this behaviour to reduce surprises. Fixes: rust-lang#3460
Automatic Rustup
Automatic Rustup
implement `libc::sched_setaffinity` on linux fixes rust-lang/miri#2749 the implementation, like `libc::sched_getaffinity`, just always returns `EINVAL`, which kind of simulates a device with zero cpus. I believe the idea is that callers of this function always do it to optimize, so they are likely to gracefully recover from this function returning an error. based on the libc crate, these functions are also available on android and freebsd (but not on macos or windows). So should the implementation of the `sched_*` functions just be copied to the android and freebsd shims?
We have to compare unknown_bottom as well, it is semantically relevant!
Stacked Borrows: fix PartialEq for Stack We have to compare unknown_bottom as well, it is semantically relevant! This could have merged two adjacent stacks that are not actually equal...
Automatic Rustup
Implement support for multiple TLS destructors on macOS I want to get rid of [this `#[cfg]` block](https://github.com/rust-lang/rust/blob/98dcbae5c9ac615d5acfbf42d42b19a77cb9ec11/library/std/src/thread/mod.rs#L195-L211) in `std`, but it is currently required for miri, as it does not support multiple macOS TLS destructors. This is not true for the platform itself, however, as can be observed in the [implementation](https://github.com/apple-oss-distributions/dyld/blob/d552c40cd1de105f0ec95008e0e0c0972de43456/dyld/DyldRuntimeState.cpp#L2239).
…s. Add tests for the new behavior. libc::read shim had a bug: if underlying real call libc::read(fd, buf, N) returns M, then libc::read shim writes N bytes to buf instead of M. Remaining N - M bytes are filled with zeros. This commit fixes this bug and adds tests for new behavior
Fix libc::read shim: make it write to a buffer correct amount of bytes. Add tests for new behavior libc::read shim had a bug: if underlying real call libc::read(fd, buf, N) returns M, then libc::read shim writes N bytes to buf instead of M. Remaining N - M bytes are filled with zeros. This commit fixes this bug and adds tests for new behavior
…RalfJung add test for intermediate reference in '&(*x).0 as *const i32'
Implement the `os_unfair_lock` functions on macOS These are needed for rust-lang#122408. See the documentation [here](https://developer.apple.com/documentation/os/synchronization?language=objc) and the implementation [here](https://github.com/apple-oss-distributions/libplatform/blob/a00a4cc36da2110578bcf3b8eeeeb93dcc7f4e11/src/os/lock.c#L645).
The Miri subtree was changed cc @rust-lang/miri |
@bors r+ p=1 |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d9284af): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 700.185s -> 701.292s (0.16%) |
r? @ghost