You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
miri: add guest-debugging, including frame accesses. (#12575)
* miri: add guest-debugging, including frame accesses.
The fix to `vm_store_context` provenance in `record_unwind`/`unwind`
is a little weird to me. I was seeing mut access to the
`vm_store_context` via `store.vm_store_context_mut()` in
`record_unwind` (before this diff) then access via the previously
saved raw pointer in the `CallThreadState`, which was registered as
invalid and I believe is indeed invalid. This was only manifesting
when setting `Config::guest_debug`, even without the frame-handle
accesses added here. I didn't dig into the exact diff in codegen or
runtime behavior that caused this but in any case, accessing
`vm_store_context` via these two different paths (with one mut)
appears to be unsound in any case. The fix here is to set the unwind
state via the raw pointer in `CallThreadState` since that's the only
path that the subsequent `unwind` has access to.
Unrelated but useful: `ci/miri-provenance.test.sh` now accepts
`MIRI_RUST_VERSION=+nightly` or whatnot, which is nice for running
locally (I keep `stable` as my default toolchain).
* Revert MIRI_RUST_VERSION in the CI script and add note about `rustup run` instead.
* Add a bit more usage of debug API to Pulley provenance test.
* Switch to using `Store`-derived `VMStoreContext` where available and re-deriving the raw pointer in `CallThreadState`.
prtest:full
0 commit comments