Skip to content

Commit 2b8e73a

Browse files
committed
Auto merge of #134604 - RalfJung:miri-sync, r=RalfJung
Miri subtree update r? `@ghost`
2 parents 88ecf3f + 601b250 commit 2b8e73a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1473
-998
lines changed

README.md

+13-10
Original file line numberDiff line numberDiff line change
@@ -375,16 +375,19 @@ to Miri failing to detect cases of undefined behavior in a program.
375375
* `-Zmiri-disable-weak-memory-emulation` disables the emulation of some C++11 weak
376376
memory effects.
377377
* `-Zmiri-native-lib=<path to a shared object file>` is an experimental flag for providing support
378-
for calling native functions from inside the interpreter via FFI. Functions not provided by that
379-
file are still executed via the usual Miri shims.
380-
**WARNING**: If an invalid/incorrect `.so` file is specified, this can cause Undefined Behavior in Miri itself!
381-
And of course, Miri cannot do any checks on the actions taken by the native code.
382-
Note that Miri has its own handling of file descriptors, so if you want to replace *some* functions
383-
working on file descriptors, you will have to replace *all* of them, or the two kinds of
384-
file descriptors will be mixed up.
385-
This is **work in progress**; currently, only integer arguments and return values are
386-
supported (and no, pointer/integer casts to work around this limitation will not work;
387-
they will fail horribly). It also only works on Unix hosts for now.
378+
for calling native functions from inside the interpreter via FFI. The flag is supported only on
379+
Unix systems. Functions not provided by that file are still executed via the usual Miri shims.
380+
**WARNING**: If an invalid/incorrect `.so` file is specified, this can cause Undefined Behavior in
381+
Miri itself! And of course, Miri cannot do any checks on the actions taken by the native code.
382+
Note that Miri has its own handling of file descriptors, so if you want to replace *some*
383+
functions working on file descriptors, you will have to replace *all* of them, or the two kinds of
384+
file descriptors will be mixed up. This is **work in progress**; currently, only integer and
385+
pointers arguments and return values are supported and memory allocated by the native code cannot
386+
be accessed from Rust (only the other way around). Native code must not spawn threads that keep
387+
running in the background after the call has returned to Rust and that access Rust-allocated
388+
memory. Finally, the flag is **unsound** in the sense that Miri stops tracking details such as
389+
initialization and provenance on memory shared with native code, so it is easily possible to write
390+
code that has UB which is missed by Miri.
388391
* `-Zmiri-measureme=<name>` enables `measureme` profiling for the interpreted program.
389392
This can be used to find which parts of your program are executing slowly under Miri.
390393
The profile is written out to a file inside a directory called `<name>`, and can be processed

bench-cargo-miri/backtraces/Cargo.lock

+83-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bench-cargo-miri/serde1/Cargo.lock

+26-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)