X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftools%2Fmiri%2FREADME.md;h=48581f6bbff1a7e2753ef9a1a753cfa993e3f9a9;hb=35cf81d707f5e0ef6578540ded961ca096abf9e8;hp=989a196b700c34a6e125b0e0249dcf8d297eb5c3;hpb=2ace0c64024783c39a84c25564d6f5a2e17eb002;p=rust.git diff --git a/src/tools/miri/README.md b/src/tools/miri/README.md index 989a196b700..48581f6bbff 100644 --- a/src/tools/miri/README.md +++ b/src/tools/miri/README.md @@ -399,6 +399,8 @@ to Miri failing to detect cases of undefined behavior in a program. * `-Zmiri-track-weak-memory-loads` shows a backtrace when weak memory emulation returns an outdated value from a load. This can help diagnose problems that disappear under `-Zmiri-disable-weak-memory-emulation`. +* `-Zmiri-force-page-size=` overrides the default page size for an architecture, in multiples of 1k. + `4` is default for most targets. This value should always be a power of 2 and nonzero. [function ABI]: https://doc.rust-lang.org/reference/items/functions.html#extern-function-qualifier @@ -574,6 +576,21 @@ extern "Rust" { /// Miri-provided extern function to deallocate memory. fn miri_dealloc(ptr: *mut u8, size: usize, align: usize); + + /// Convert a path from the host Miri runs on to the target Miri interprets. + /// Performs conversion of path separators as needed. + /// + /// Usually Miri performs this kind of conversion automatically. However, manual conversion + /// might be necessary when reading an environment variable that was set on the host + /// (such as TMPDIR) and using it as a target path. + /// + /// Only works with isolation disabled. + /// + /// `in` must point to a null-terminated string, and will be read as the input host path. + /// `out` must point to at least `out_size` many bytes, and the result will be stored there + /// with a null terminator. + /// Returns 0 if the `out` buffer was large enough, and the required size otherwise. + fn miri_host_to_target_path(path: *const i8, out: *mut i8, out_size: usize) -> usize; } ```