-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interpret memory access hooks: also pass through the Pointer used for the access #138713
Conversation
@@ -413,6 +413,7 @@ pub trait Machine<'tcx>: Sized { | |||
_tcx: TyCtxtAt<'tcx>, | |||
_machine: &Self, | |||
_alloc_extra: &Self::AllocExtra, | |||
_ptr: Pointer<Option<Self::Provenance>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document that these pointers are always "the same" information as the prov
argument, just before being taken apart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
r=me with comment |
72272d2
to
b9f59f6
Compare
@bors r=oli-obk rollup |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#137357 (Document results of non-positive logarithms) - rust-lang#138650 (Optimize `io::Write::write_fmt` for constant strings) - rust-lang#138694 (Fix: add ohos target notes) - rust-lang#138713 (interpret memory access hooks: also pass through the Pointer used for the access) - rust-lang#138724 (Check attrs: Don't try to retrieve the name of list stems) - rust-lang#138743 (bootstrap: add `--ci` flag) - rust-lang#138751 (Fix the "used_with_archive" test on Fuchsia) - rust-lang#138754 (Handle spans of `~const`, `const` and `async` trait bounds in macro expansion) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138713 - RalfJung:memory-hook-pointers, r=oli-obk interpret memory access hooks: also pass through the Pointer used for the access In some ongoing work on the Miri side, we need the absolute address that the memory access occurred at. That is non-trivial to obtain since we don't have an `ecx`. So pass through the `Pointer` used for the access, which contains the address, and which is available everywhere we are calling these hooks. r? `@oli-obk`
In some ongoing work on the Miri side, we need the absolute address that the memory access occurred at. That is non-trivial to obtain since we don't have an
ecx
. So pass through thePointer
used for the access, which contains the address, and which is available everywhere we are calling these hooks.r? @oli-obk