@@ -396,20 +396,22 @@ to Miri failing to detect cases of undefined behavior in a program.
396
396
* `-Zmiri-force-intrinsic-fallback` forces the use of the "fallback" body for all intrinsics that
397
397
have one. This is useful to test the fallback bodies, but should not be used otherwise. It is
398
398
**unsound** since the fallback body might not be checking for all UB.
399
- * `-Zmiri-native-lib=<path to a shared object file>` is an experimental flag for providing support
400
- for calling native functions from inside the interpreter via FFI. The flag is supported only on
401
- Unix systems. Functions not provided by that file are still executed via the usual Miri shims. If
402
- a path to a directory is specified, all files in that directory are included nonrecursively. This
403
- flag can be passed multiple times to specify multiple files and/or directories.
399
+ * `-Zmiri-native-lib=<path to a shared object file or folder>` is an experimental flag for providing
400
+ support for calling native functions from inside the interpreter via FFI. The flag is supported
401
+ only on Unix systems. Functions not provided by that file are still executed via the usual Miri
402
+ shims. If a path to a directory is specified, all files in that directory are included
403
+ non-recursively. This flag can be passed multiple times to specify multiple files and/or
404
+ directories.
404
405
**WARNING**: If an invalid/incorrect `.so` file is specified, this can cause Undefined Behavior in
405
406
Miri itself! And of course, Miri often cannot do any checks on the actions taken by the native code.
406
407
Note that Miri has its own handling of file descriptors, so if you want to replace *some*
407
408
functions working on file descriptors, you will have to replace *all* of them, or the two kinds of
408
- file descriptors will be mixed up. This is **work in progress**; currently, only integer and
409
- pointers arguments and return values are supported and memory allocated by the native code cannot
410
- be accessed from Rust (only the other way around). Native code must not spawn threads that keep
411
- running in the background after the call has returned to Rust and that access Rust-allocated
412
- memory. Finally, the flag is **unsound** in the sense that Miri stops tracking details such as
409
+ file descriptors will be mixed up.
410
+ This is **work in progress**; currently, only integer and pointers arguments and return values are
411
+ supported and memory allocated by the native code cannot be accessed from Rust (only the other way
412
+ around). Native code must not spawn threads that keep running in the background after the call has
413
+ returned to Rust and that access Rust-allocated memory.
414
+ Finally, the flag is **unsound** in the sense that Miri stops tracking details such as
413
415
initialization and provenance on memory shared with native code, so it is easily possible to write
414
416
code that has UB which is missed by Miri.
415
417
* `-Zmiri-measureme=<name>` enables `measureme` profiling for the interpreted program.
0 commit comments