run rustdoc with the miri cfg flag
This is important to be able to control which doctests run with `cargo miri test`. In particular, this is required for https://github.com/rust-lang/rust/pull/90909 to work as intended.
Add flag to check for uninitialized numbers
Closes#1340.
Companion rustc PR that implements this in the Miri engine: rust-lang/rust#88670
r? `@RalfJung`
This commit adds a `-Zmiri-check-number-initialization` flag to check
that integers and floats are initialized.
This commit also changes some shims to write at type `MaybeUninit<...>`
in order to prevent spurious errors from the uninit check.
add support for `#[global_allocator]`
This PR adds support for custom global allocators. Unfortunately, the code given in #1207 still causes errors when used with box. I believe this is because Box is special-cased in miri and stacked borrows.
Correct Windows argument handling
Previously the command line string would have been incorrectly constructed if argv[0] contained a doublequote (`"`) or ended in a trailing backslash (`\`). This is a very rare edge case because, by convention, argv[0] is the path to the application and Windows file names cannot contain doublequotes.
Fixes#1881
Previously the command line string would have been incorrectly constructed if argv[0] contained a doublequote (`"`) or ended in a trailing backslash (`\`). This is a very rare edge case because, by convention, argv[0] is the path to the application and Windows file names cannot contain doublequotes.
Fixes#1881
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.
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.
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.