Skip to content

Commit f8f2255

Browse files
committed
readme: document permissive-provenance flag
1 parent f7bc441 commit f8f2255

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,17 @@ to Miri failing to detect cases of undefined behavior in a program.
318318
application instead of raising an error within the context of Miri (and halting
319319
execution). Note that code might not expect these operations to ever panic, so
320320
this flag can lead to strange (mis)behavior.
321+
* `-Zmiri-permissive-provenance` is **experimental**. This will make Miri do a
322+
best-effort attempt to implement the semantics of
323+
[`expose_addr`](https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.expose_addr)
324+
and
325+
[`ptr::from_exposed_addr`](https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html)
326+
for pointer-to-int and int-to-pointer casts, respectively. This will
327+
necessarily miss some bugs as those semantics are not efficiently
328+
implementable in a sanitizer, but it will only miss bugs that concerns
329+
memory/pointers which is subject to these operations. Also note that this flag
330+
is currently incompatible with Stacked Borrows, so you will have to also pass
331+
`-Zmiri-disable-stacked-borrows` to use this.
321332
* `-Zmiri-seed=<hex>` configures the seed of the RNG that Miri uses to resolve
322333
non-determinism. This RNG is used to pick base addresses for allocations.
323334
When isolation is enabled (the default), this is also used to emulate system

0 commit comments

Comments
 (0)