Open alexcrichton opened 3 months ago
Ralf also pointed to https://github.com/rust-lang/unsafe-code-guidelines/issues/497 which has some interesting discussion and I believe reaches a similar conclusion.
Ralf also pointed to rust-lang/unsafe-code-guidelines#497 which has some interesting discussion and I believe reaches a similar conclusion.
This comment from Ralf, in particular, seems to summarize our recent discussions: https://github.com/rust-lang/unsafe-code-guidelines/issues/497#issuecomment-2003100550
This started out as https://github.com/bytecodealliance/wasmtime/issues/9015 but I'm evolving this now to be about Pulley specifically. Current thinking is that Pulley will not be compatible with
-Zmiri-strict-provenance
, but changes are necessary to make it compatible with-Zmiri-permissive-provenance
. I believe the concrete of changes are:ptr: *mut u8
field ofXRegValUnion
must be replaced with ausize
valuenew_ptr
constructor will useexpose_provenance
and load/store usizeget_ptr
accessor will usewith_exposed_provenance
with theusize
fieldexpose_provenance
on any pointers that Pulley may access. This notably affects theVMContext
field and any transitive pointers that it contains. This can probably be done during the construction ofVMContext
itself.Right now
expose_provenance
andwith_exposed_provenance
are unstable so I don't believe that this is actionable at this time, but I wanted to write this down for later.cc @fitzgen