-
Notifications
You must be signed in to change notification settings - Fork 13.3k
interpret memory access hooks: also pass through the Pointer used for the access #138713
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oli-obk
reviewed
Mar 20, 2025
@@ -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!
oli-obk
approved these changes
Mar 20, 2025
r=me with comment |
72272d2
to
b9f59f6
Compare
@bors r=oli-obk rollup |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 21, 2025
…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
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 21, 2025
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`
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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